On 3/23/11 9:42 AM, Esben Byskov wrote:
> *Hi maxima list,
>
> The outcome of the session below is somewhat disturbing,
> I think. Maybe there is a valid explanation.
> *
> Maxima 5.23.2 http://maxima.sourceforge.net
> using Lisp CLISP 2.44.1 (2008-02-23)
> Distributed under the GNU Public License. See the file COPYING.
> Dedicated to the memory of William Schelter.
> The function bug_report() provides bug reporting information.
> (%i1) r: 735/25;
> 147
> (%o1) ---
> 5
> (%i2) float(r);
> (%o2) 29.4
> (%i3) fr: factor(r);
> 2
> 3 7
> (%o3) ----
> 5
> (%i4) ffr: float(fr);
> (%o4) 29.40000000000001
I think this is because float(fr) computes the result in pieces. So
float(fr) is computed as float(1/5)*float(3)*float(7^2), which does, in
fact, return the result in %o4.
How did I choose this decomposition? I looked at how maxima expressed
%o3 by using :lisp $%o3 and saw that it represented it as, essentially
(1/5)*3*(7^2).
Ray