Mercurial > hg > CbC > old > device
comparison test/float.c @ 91:9b1aeb62e0b9
powerpc continue... (floating point)
author | kono |
---|---|
date | Fri, 07 Mar 2003 05:22:01 +0900 |
parents | 07e3113c3c13 |
children | 1ad7045741a7 |
comparison
equal
deleted
inserted
replaced
90:07e3113c3c13 | 91:9b1aeb62e0b9 |
---|---|
11 double d = 0.3; | 11 double d = 0.3; |
12 float f1 = 0.3; | 12 float f1 = 0.3; |
13 double d1 = 0.3; | 13 double d1 = 0.3; |
14 double d2 = -0.2; | 14 double d2 = -0.2; |
15 | 15 |
16 int | |
17 d2i(double d) { | |
18 return (int)d; | |
19 } | |
20 | |
21 double | |
22 i2d(int u) { | |
23 return (double)u; | |
24 } | |
25 | |
16 unsigned u; | 26 unsigned u; |
17 | 27 unsigned |
18 int | 28 d2u(double d) { |
19 u2w() { | 29 return (unsigned)d; |
20 d1=u; | 30 } |
21 u2w(); | 31 |
22 u=d; | 32 double |
33 u2d(unsigned u) { | |
34 return (double)u; | |
23 } | 35 } |
24 | 36 |
25 int | 37 int |
26 main(int ac,char *av[]) { | 38 main(int ac,char *av[]) { |
27 double g; | 39 double g; |