tcc-stupidos/tests/tests2/134_double_to_signed.c
kbkpbot eef2db71a9 revert commit b8b6a5fd7b
As it will cause printf("%llu\n", (unsigned long long)1e19); output
9223372036854775808
instead of
10000000000000000000
2024-12-30 12:19:01 +08:00

12 lines
241 B
C

#include <stdio.h>
int main() {
printf("%d\n", (int)-1.0);
double d = -1.0;
printf("%d\n", (int)d);
printf("%d\n", (int)-2147483648.0);
d = -2147483648.0;
printf("%d\n", (int)d);
printf("%llu\n", (unsigned long long)1e19);
}