C
areful!
Common Lisp:
(rationalize 0.1) => 1/10
(rational 0.1) =>
3602879701896397/36028797018963968
Maxima:
rationalize(0.1) =>
3602879701896397/36028797018963968
rat(0.1) => 1/10
That is, CL/rationalize = Max/rat and Max/rationalize = CL/rational
-s
On Thu, Apr 4, 2013 at 4:40 PM, Richard Fateman
<fateman at eecs.berkeley.edu>wrote:
> Use the lisp functions...
>
> ?rationalize(0.1);
> ?rational(0.1);
>
> The hardware is probably the same. Some systems are disabling
> denormalized numbers, I think.
> Also some may do an inferior job of decimal to binary conversion,
> and the reverse.
>
> Looking at the rational representation should help.
>
> By the way, those lisp functions will return rational numbers that are in
> a
> different form from Maxima rationals, but are OK to just look at.
>
> RJF
>
> On 4/4/13 1:02 PM, Stavros Macrakis wrote:
>
> The documentation for 'rationalize' has some problems.
>
> The examples show rationalize(0.1) => 1/10, though the *text *clearly
> and correctly says that it is *not* 1/10.
>
> Also, what is the point of unitfrac? This says "Example use", but
> doesn't use rationalize at all.
>
> -s
>
> 5.28.0
> 2012-09-10 10:33:40
> i386-apple-darwin11.4.0
> SBCL 1.0.55.0-abb03f9
>
>
>
> _______________________________________________
> Maxima mailing listMaxima at math.utexas.eduhttp://www.math.utexas.edu/mailman/listinfo/maxima
>
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>