This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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 c++/64497] std::scalbln does not round correctly for long doubles


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 );
}


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