[COMMITTED] math: Fix non-portability in the computation of signgam in lgammaf

Vincent Lefevre vincent@vinc17.net
Mon Nov 25 16:02:47 GMT 2024


On 2024-11-25 15:17:30 +0000, Wilco Dijkstra wrote:
> Hi Adhemerval,
> 
> +  if (__glibc_unlikely (fx >= 0))
> +    *signgamp = 1;
> 
> Did you mean likely here (as the description suggests)?

This should be likely. In my patch for CORE-MATH, I changed

  if (__builtin_expect (fx >= 0x1p31f, 0))

to

  if (__builtin_expect (fx >= 0, 1))

See the change of 0 to 1 for the second argument of __builtin_expect.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the Libc-alpha mailing list