Re: Man page issues: logb, significand, cbrt, log2, log10, exp10

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

 



I think what happens is that the compiler (not glibc) computes that
exp10 for you and that the compiler happens to be more accurate.
Here's what I get for the loop:

  for (int i = 1; i < 20; i++) {
    printf ("%.20g\n", exp10 (i));
  }

welinder@CarbonX1:~$ ./a.out
10
100
1000.0000000000001137
10000.000000000001819
100000
1000000
9999999.9999999981374
99999999.999999985099
999999999.99999988079
10000000000
100000000000
1000000000000
10000000000000
100000000000000
1000000000000000
10000000000000000
99999999999999984
1000000000000000000
10000000000000000000

Here's the bug report to go with this:
https://sourceware.org/bugzilla/show_bug.cgi?id=28472
Note comment 6.  It is clearly not a high-priority item for glibc.

M.




[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