mirror of
https://github.com/mirror/tinycc.git
synced 2025-02-26 08:00:09 +08:00
Revert "add tests for float conversions to u64"
Because test's are not applicable in this case.
This reverts commit a5e714abec
.
This commit is contained in:
parent
c9bbd4e707
commit
55b4754e84
@ -14,12 +14,6 @@ test()
|
||||
}
|
||||
}
|
||||
|
||||
double coerce(double x)
|
||||
{
|
||||
x++;
|
||||
return x;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
// variables
|
||||
@ -61,31 +55,7 @@ int main()
|
||||
// type coercion
|
||||
a = 2;
|
||||
printf("%f\n", a);
|
||||
printf("%f\n", coerce(2));
|
||||
|
||||
//type conversion to unsigned long int
|
||||
float f = 3421.439;
|
||||
double d = 7855.332231;
|
||||
long double ld = 2469.346786989643234;
|
||||
|
||||
unsigned long int i;
|
||||
i = f;
|
||||
printf("%lu\n", i);
|
||||
i = d;
|
||||
printf("%lu\n", i);
|
||||
i = ld;
|
||||
printf("%lu\n", i);
|
||||
|
||||
f = -3421.439;
|
||||
d = -7855.332231;
|
||||
ld = -2469.346786989643234;
|
||||
i = f;
|
||||
printf("%lu\n", i);
|
||||
i = d;
|
||||
printf("%lu\n", i);
|
||||
i = ld;
|
||||
printf("%lu\n", i);
|
||||
|
||||
printf("%f\n", sin(2));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -13,10 +13,4 @@
|
||||
12.340000
|
||||
-12.340000
|
||||
2.000000
|
||||
3.000000
|
||||
3421
|
||||
7855
|
||||
2469
|
||||
18446744073709548195
|
||||
18446744073709543761
|
||||
18446744073709549147
|
||||
0.909297
|
||||
|
Loading…
Reference in New Issue
Block a user