public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51559] New: decimal128 operates incorrectly compared to decimal32 and decimal64
@ 2011-12-14 22:56 mingodad at gmail dot com
  2011-12-14 23:46 ` [Bug c++/51559] " mingodad at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: mingodad at gmail dot com @ 2011-12-14 22:56 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51559

             Bug #: 51559
           Summary: decimal128 operates incorrectly compared to decimal32
                    and decimal64
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: mingodad@gmail.com


Created attachment 26092
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26092
Program that demostrates decimal128 fault

Testing the new decimal classes on g++ mingw4.6.1.2 with this program the
decimal32 and decimal64 are showing the expected answer but decimal128 doesn't
all parameters are equal but the result not.

With all 3 decimal classes three instances are created with the following
values:

std::decimal::decimal* dn(.3), dn2(.099), dn3(1000), dn4(201);
dn-=dn2;
dn*=dn3;
cout << "decimal* = "  << (dn==dn4) << " : " << decimal*_to_double(dn) << endl;

Expects "dn==dn4" on all but decimal128 fails.


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

end of thread, other threads:[~2013-08-15 13:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-14 22:56 [Bug c++/51559] New: decimal128 operates incorrectly compared to decimal32 and decimal64 mingodad at gmail dot com
2011-12-14 23:46 ` [Bug c++/51559] " mingodad at gmail dot com
2011-12-15  9:44 ` mingodad at gmail dot com
2013-08-15 13:59 ` kubry at terra dot com

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).