annotate run/real_22.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 80e1b85295b3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
376
52a8b1249941 float literals versus variable
thomask
parents:
diff changeset
1 // $HeadURL$
52a8b1249941 float literals versus variable
thomask
parents:
diff changeset
2 // $Date$
52a8b1249941 float literals versus variable
thomask
parents:
diff changeset
3 // $Author$
52a8b1249941 float literals versus variable
thomask
parents:
diff changeset
4
564
e77e4444c170 partial metadata fix
thomask
parents: 377
diff changeset
5 // @author@ Derek Parnell <derek@psych.ward>
376
52a8b1249941 float literals versus variable
thomask
parents:
diff changeset
6 // @date@ 2005-04-02
52a8b1249941 float literals versus variable
thomask
parents:
diff changeset
7 // @uri@ news:5efpfwr0e1l5$.ks45nx0xz2zf$.dlg@40tude.net
52a8b1249941 float literals versus variable
thomask
parents:
diff changeset
8
52a8b1249941 float literals versus variable
thomask
parents:
diff changeset
9 module dstress.run.real_22;
52a8b1249941 float literals versus variable
thomask
parents:
diff changeset
10
52a8b1249941 float literals versus variable
thomask
parents:
diff changeset
11 int main(){
958
80e1b85295b3 DMD-0.154 review
thomask
parents: 564
diff changeset
12 real f = 0.0000195L;
80e1b85295b3 DMD-0.154 review
thomask
parents: 564
diff changeset
13
80e1b85295b3 DMD-0.154 review
thomask
parents: 564
diff changeset
14 if(typeid(typeof(0.0000195L)) != typeid(real)){
80e1b85295b3 DMD-0.154 review
thomask
parents: 564
diff changeset
15 assert(0);
80e1b85295b3 DMD-0.154 review
thomask
parents: 564
diff changeset
16 }
80e1b85295b3 DMD-0.154 review
thomask
parents: 564
diff changeset
17
80e1b85295b3 DMD-0.154 review
thomask
parents: 564
diff changeset
18 if(.5L + f * 1e6L != .5L + 0.0000195L * 1e6L){
80e1b85295b3 DMD-0.154 review
thomask
parents: 564
diff changeset
19 assert(0);
80e1b85295b3 DMD-0.154 review
thomask
parents: 564
diff changeset
20 }
80e1b85295b3 DMD-0.154 review
thomask
parents: 564
diff changeset
21
376
52a8b1249941 float literals versus variable
thomask
parents:
diff changeset
22 return 0;
52a8b1249941 float literals versus variable
thomask
parents:
diff changeset
23 }