-- Option variable: keepfloat Default value:
true, prevents floating point numbers from being rationalized when expressions which contain them are converted to canonical rational expression (CRE) form.
Note that the function
solve and those functions calling it (
eigenvalues, for example) currently ignore this flag, converting floating point numbers anyway.
rat replaced 0.5 by 1/2 = 0.5 x
(%i2) rat(x/2.0), keepfloat;
(%o2)/R/ 0.5 x
(%i3) solve(1.0-x,x), keepfloat;
ratreplaced 1.0 by 1/1 = 1.0 (%o3) [x = 1]
(%o1) true (%i2)