[Bug c++/64497] std::scalbln does not round correctly for long doubles

2015-01-06 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64497 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC|

[Bug c++/64497] std::scalbln does not round correctly for long doubles

2015-01-05 Thread cubbi at cubbi dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64497 Sergey Zubkov changed: What|Removed |Added CC||cubbi at cubbi dot org --- Comment #5 fr

[Bug c++/64497] std::scalbln does not round correctly for long doubles

2015-01-05 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64497 --- Comment #4 from Jonathan Wakely --- Looking at the C standard, it seems that the result is implementation-defined on underflow, and zero is a valid result. C++ doesn't change that.

[Bug c++/64497] std::scalbln does not round correctly for long doubles

2015-01-05 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64497 --- Comment #3 from Jonathan Wakely --- (In reply to Walter Mascarenhas from comment #2) > What if there is a difference in the expected behavior > for this function in C and C++11? There isn't any difference, so it doesn't matter. > Is it not

[Bug c++/64497] std::scalbln does not round correctly for long doubles

2015-01-05 Thread walter.mascarenhas at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64497 --- Comment #2 from Walter Mascarenhas --- What if there is a difference in the expected behavior for this function in C and C++11? Is it not up to g++ for implementing what is mandated in C++11? (This is not a rhetorical question, I really do n

[Bug c++/64497] std::scalbln does not round correctly for long doubles

2015-01-05 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64497 --- Comment #1 from Jonathan Wakely --- 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 #include #include