Even in Perl you've got

MigMit:~ MigMit$ perl -e 'printf("%.20f\n",log(125)/log(5))'
3.00000000000000044409

On 22 Aug 2009, at 13:24, Roberto López wrote:

If 4.0 / 2.0 was 1.9999999999999999999998, it would be ok?

The real value of log10 1000 is 3 (3.0). It can be represented with accuracy
and it should be.

You get the accuracy value in Perl, but there is the same problem in Python.
It's a bit discouraging.


Eugene Kirpichov wrote:

What do you consider to be the specification of logBase? Exact
floating-point numbers don't exist, so it has to return an
approximation. The standard doesn't give any guarantees as to the
precision of the approximation. Is a precision of 0.00000000000004 not
satisfactory for you?



_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to