dev/vala/long_double/test128float.vala

18 lines
463 B
Vala
Raw Normal View History

2017-08-08 19:02:30 +03:00
void main () {
stdout.printf ("sizeof (double) = %lu\n", sizeof(double));
stdout.printf ("sizeof (Double128) = %lu\n", sizeof(Double128));
Double128 d1 = 16.0;
stdout.printf ("Double128: 16 ^ 2 = %f\n", d1 * d1);
double d = 1e-15;
stdout.printf ("double: d = %e, ", d);
d += 1; d -= 1;
stdout.printf ("(+-1) d = %e\n", d);
Double128 ld = 1e-19;
stdout.printf ("Double128: ld = %e, ", ld);
ld += 1; ld -= 1;
stdout.printf ("(+-1) ld = %e\n", ld);
}