This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64497] std::scalbln does not round correctly for long doubles
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 05 Jan 2015 12:29:50 +0000
- Subject: [Bug c++/64497] std::scalbln does not round correctly for long doubles
- Auto-submitted: auto-generated
- References: <bug-64497-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64497
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
GCC just calls the scalnlnl() function in libm, so it's not a GCC bug, and is
not specific to C++ either. I suggest you report it to your libc vendor.
Complete testcase in C:
#include <stdio.h>
#include <math.h>
#include <assert.h>
int main()
{
long double di = scalbnl(1.1L, -16446);
assert( di != 0.0L );
long double dl = scalblnl(1.1L, -16446L);
assert( dl != 0.0L );
}