public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/64497] New: std::scalbln does not round correctly for long doubles
@ 2015-01-05 10:40 walter.mascarenhas at gmail dot com
  2015-01-05 12:29 ` [Bug c++/64497] " redi at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: walter.mascarenhas at gmail dot com @ 2015-01-05 10:40 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-01-06  9:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-05 10:40 [Bug c++/64497] New: std::scalbln does not round correctly for long doubles walter.mascarenhas at gmail dot com
2015-01-05 12:29 ` [Bug c++/64497] " redi at gcc dot gnu.org
2015-01-05 13:11 ` walter.mascarenhas at gmail dot com
2015-01-05 14:07 ` redi at gcc dot gnu.org
2015-01-05 14:13 ` redi at gcc dot gnu.org
2015-01-06  4:33 ` cubbi at cubbi dot org
2015-01-06  9:07 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).