Should return something like: 2.77777778
Instead I am getting: 0.00000027777779102325
I set it to output to 20 places as otherwise is was displaying: 0.000000
It is successful in doing the math, just wondering why it has all the preceding zeros?
Your right! Where the hell was I getting that value from I was saying?? lol thanks.. it was right all along..
How is it able to print out to 20 decimal places if the doc says it only supports upto 6/7?
The smallest representable "float" value (FLT_MIN) is something like 1.1x10-38, but the representation only guarantees about six or seven places of decimals.
So, for instance, you can represent 1.0 in one "float" variable and FLT_MIN in another, but if you add them together, the result is still 1.0.
You can, however, add FLT_MIN to FLT_MIN and get 2 * FLT_MIN, just as you can add 1.0 to 1.0 and get 2.0