Implement C23 pown [committed]

Carlos O'Donell carlos@redhat.com
Fri May 30 13:43:13 GMT 2025


On 4/22/25 12:39 PM, Joseph Myers wrote:
> On Mon, 14 Apr 2025, Florian Weimer wrote:
> 
>> * Joseph Myers:
>>
>>> C23 adds various <math.h> function families originally defined in TS
>>> 18661-4.  Add the pown functions, which are like pow but with an
>>> integer exponent.  That exponent has type long long int in C23; it was
>>> intmax_t in TS 18661-4, and as with other interfaces changed after
>>> their initial appearance in the TS, I don't think we need to support
>>> the original version of the interface.  The test inputs are based on
>>> the subset of test inputs for pow that use integer exponents that fit
>>> in long long.
>>
>> The test current fails with IBM long double, see below.
> 
> For IBM long double, the trivial case applies:
> 
> #if M_MANT_DIG >= LLONG_WIDTH - 1
>    ret = M_SUF (__ieee754_pow) (x, y);
> #else
> 
> So I think these are all either libgcc bugs in the conversion from long
> long to long double in non-default rounding modes (so should be XFAILed
> with xfail-rounding:ibm128-libgcc / XFAIL_ROUNDING_IBM128_LIBGCC) or else
> bugs in how the underlying powl handles particular arguments.
> 

Sachin,

Would you be able to look into XFAIL-ing these tests in your capacity as
ppc64le machine maintainer?

As Joseph notes these are likely XFAILs for IBM long double format.

-- 
Cheers,
Carlos.



More information about the Libc-alpha mailing list