Janet
@Janet

huh... so uh... i am observing weird behavior in code compiled using tinycc on windows...

it's like:

float d = 0.6f;
float x = pow(d/4.f, 4.f);
printf("x: %e pow(...): %e", x, pow(d/4.f, 4.f));

you'd expect both x and the just computed output of pow to be the same, ne?

but it isn't... for some reason x contains 256 instead of the expected 5.0625e-4


Janet
@Janet

it appears the 64bit version is kinda borked...


You must log in to comment.

in reply to @Janet's post:

Is this some weirdness with pow expecting doubles instead of floats?

Well that should probably happen in the second invocation too, but it also outputs a double that you're not converting to float before storing, maybe?