Okay, I'm running the following code in GCC 4.1.2:
<stdio.h>
int main(void)
{
long double test = 4.67e-4;
printf("float: %f e-notation: %e\n", test, test);
return 0;
}
I'm expecting something like the following results:
float: 0.000467 e-notation: 4.67000e-05
but instead, I get the following results:
float: -69441527659720390616132329106879905271265162747383 26277051364061548998292338911457643245167311365849 94939249352577342742286164740704820047241658318432 03634399732116838814293139990778757446217299595246 28730068989817917060091919713159447848299377718491 87328.000000 e-notation: 4.802997e+149
What exactly is the issue here?
I'm using GCC 4.1.2 on an Intel p3, if that matters.