https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64497
Bug ID: 64497 Summary: std::scalbln does not round correctly for long doubles Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: walter.mascarenhas at gmail dot com The overload std::scalbln(long double, long) may not round the result correctly when the exponent is very small. For instance, with round mode = near, std::scalbln(1.1L, -16446) returns 0, whereas std::scalbn(1.1L, -16446) and std::ldexp(1.1L, -16446) return std::numeric_limits<long double>::denorm_min(), which I believe is the correct result.