ilogb manpage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

The ilogb manpage currently claims that errno is not set on error:

       Domain error: x is 0 or a NaN
              An invalid floating-point exception (FE_INVALID) is raised.

              These functions do not set errno for this case.

       Domain error: x is an infinity

              These functions do not set errno or raise an exception
for this case.

However this is at odds with the ISO C standard an the most recent glibc code:

int
__ilogb (double x)
{
  int r = __ieee754_ilogb (x);
  if (__builtin_expect (r == FP_ILOGB0, 0)
      || __builtin_expect (r == FP_ILOGBNAN, 0)
      || __builtin_expect (r == INT_MAX, 0))
    {
      __set_errno (EDOM);
      feraiseexcept (FE_INVALID);
    }
  return r;
}


-- 
Will Newton
Toolchain Working Group, Linaro
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux