This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51559] New: decimal128 operates incorrectly compared to decimal32 and decimal64
- From: "mingodad at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 14 Dec 2011 22:45:39 +0000
- Subject: [Bug c++/51559] New: decimal128 operates incorrectly compared to decimal32 and decimal64
- Auto-submitted: auto-generated
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.