annotate run/ieee_754_zerocomp_03.d @ 1576:b3e16c86558e

[Issue 1398] New: GDC doesn't generate correct code <mariusmuja@gmail.com> 2007-08-04 http://d.puremagic.com/issues/show_bug.cgi?id=1398
author thomask
date Thu, 21 Feb 2008 15:20:08 +0000
parents e720ce827c1c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
496
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
1 // $HeadURL$
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
2 // $Date$
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
3 // $Author$
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
4
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
5 module dstress.run.ieee_754_zerocomp_03;
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
6
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
7 int main(){
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
8 cfloat f1, f2;
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
9
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
10 f1=0.0f+0.0fi;
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
11 f2=-f1;
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
12 assert(f1==f2);
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
13
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
14 f1=0.0f-0.0fi;
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
15 f2=-f1;
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
16 assert(f1==f2);
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
17
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
18 f1=-0.0f+0.0fi;
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
19 f2=-f1;
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
20 assert(f1==f2);
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
21
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
22 f1=-0.0f-0.0fi;
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
23 f2=-f1;
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
24 assert(f1==f2);
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
25
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
26 return 0;
e720ce827c1c added IEEE 754 tests for 0-handing
thomask
parents:
diff changeset
27 }