Implement C23 pown [committed]

Joseph Myers josmyers@redhat.com
Wed Jun 4 15:50:53 GMT 2025


On Tue, 3 Jun 2025, Segher Boessenkool wrote:

> The commit message clearly says this implementation isd correct for
> IEEE float only.  And indeed it is not for double-double, which is very
> much not IEEE.
> 
> Maybe these tests should require IEEE float?  The implementation does,
> after all!

I don't know how you're reading the commit message as saying this is only 
correct for IEEE formats.  I might be more concerned about correctness of 
the compoundn implementation for IBM long double (although no issues have 
been reported), but not pown where, again, the implementation reduces to

#if M_MANT_DIG >= LLONG_WIDTH - 1
  ret = M_SUF (__ieee754_pow) (x, y);
#else

and if there's a problem, either it's a bug in powl, or a bug in libgcc 
converting y from long long to long double (which should be exact) outside 
round-to-nearest mode, but not a bug in this implementation.

-- 
Joseph S. Myers
josmyers@redhat.com



More information about the Libc-alpha mailing list