It is not useless in that you still use those extra places when doing the calculation. The final output can only be 6 places, but the internal calculations can be greater.

Try out something simple:

//echo -a $calc(1.0000004 + 1.0000004 + 1.0000004)
3.000001

If it ignored or rounded the 7th digit above, then it would give 3 as the output. Note that I used 4 at the end rather than using two of those with a 5 at the end so there is no confusion about those being rounded.

This really is the same as most calculators, as well. Regardless of the number of places it can output, it will usually do calculations using many more places and then give the result in X number of places.

Although it does use those digits internally to give an accurate output (to 6 places), I agree that we should get the same number of places as a standard FLOAT output or DOUBLE or whatever.


Invision Support
#Invision on irc.irchighway.net