This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug math/16339] log1p missing underflows


https://sourceware.org/bugzilla/show_bug.cgi?id=16339

Paul Zimmermann <zimmerma+gcc at loria dot fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zimmerma+gcc at loria dot fr

--- Comment #1 from Paul Zimmermann <zimmerma+gcc at loria dot fr> ---
on the other hand we get some spurious underflow exceptions, for example for
long double on x86_64:

Testing function log1p for exponent 16383 [seed=8473].
 rounding mode MPFR_RNDD:
      wrong underflow flag: mpfr gives 0, library 16
      x=-3.36210314311209350626e-4932
      library gives -3.36210314311209350626e-4932
      mpfr    gives -3.36210314311209350663e-4932

The glibc result is incorrect since log(1+x) = x - x^2/2 + o(x^2), thus it is
smaller than x for tiny x, and rounding down should give nextbelow(x).

Since |x| is the smallest normal number, no underflow exception should be
raised.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]