Take this C program: #include <stdio.h> #include <stdlib.h> #include <math.h> main() { double d; d = 1.401298 * pow(10, -45); printf("d=%g\n", (double) (float) d); } One would expect that the output would be 1.401298e-45 or 0 if a float cannot contain this number. Instead, I get 2.65249e-315. Whats up with this?
Works at least as of glibc-2.3.2-95.6.