Michel Van den Bergh <michel.vandenbergh <at> uhasselt.be> writes:
>
> This problem is easily solved in object oriented languages.
> For example in python you can create genuine decimal numbers
> if you really want to (for financial calculations I presume).
> They follow this standard
>
> http://www2.hursley.ibm.com/decimal/decarith.html
>
> It seems less clear how to do this cleanly within the maxima
> language.
>
> Michel
>
> PS. To construct the decimal number 1.4 you use the constructor
> Decimal("1.4"). Note the use of strings. Something like
> Decimal(1.4) can not work since the number 1.4 would be converted
> to binary before the constructor has a chance to look at it.
>
Hello,
Actually I had a look an these IBM-page some years ago, when a similar numerical
problem occured in python. But I had forgotten about this...
And I simply wasn't aware, that maxima and other CAS convert the input into
binary floats! (Believe it or not)
http://www2.hursley.ibm.com/decimal:
> "binary floating-point arithmetic should not be used for financial,
> commercial, and user-centric applications"
Yes! Actually I don't want to care about binary floating point arithmetic and I
don't want to be forced to do when using an symbolic computing software.
What does the symbol '1.4' mean?
It depends. True.
Now it's clear (as I have recalled it) -- but it's not satisfying: I'm (and most
people in my culture) thinking "base-10" and would wish a software not standing
in my way...
Regards,
Henning