[Bug 21] New: unexpected results for: double -> real with value 1.7976931348623157e+308
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Mar 6 09:11:08 PST 2006
http://d.puremagic.com/bugzilla/show_bug.cgi?id=21
Summary: unexpected results for: double -> real with value
1.7976931348623157e+308
Product: D
Version: 0.148
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P3
Component: DMD
AssignedTo: walter at digitalmars.com
ReportedBy: thomas-dloop at kuehne.cn
Porting from C to D.
== test.c ==
# #include <assert.h>
#
# int main(){
# double d = 1.7976931348623157e+308;
# long double ld = d;
#
# assert(ld == 1.7976931348623157e+308);
#
# return 0;
# }
== test.d ==
# int main(){
# double d = 1.7976931348623157e+308;
# real ld = d;
#
# assert(ld == 1.7976931348623157e+308);
#
# return 0;
# }
test results:
==C code (64 bit mode)==
[PASS]
double: 0xFFFFFFFFFFFFEF7F
long double: 0x00F8FFFFFFFFFFFFFE43400000000000
==C code (32 bit mode)==
[PASS]
double: 0xFFFFFFFFFFFFEF7F
long double: 0x00F8FFFFFFFFFFFFFE43FFFF
==D code (32 bit mode)==
[FAIL]
double: 0xFFFFFFFFFFFFEF7F
real: 0x00F8FFFFFFFFFFFFFE430000
test cases:
http://dstress.kuehne.cn/run/d/double_28_A.d
http://dstress.kuehne.cn/run/d/double_28_B.d
--
More information about the Digitalmars-d-bugs
mailing list