printing of floating point numbers and integers in Maxima
Subject: printing of floating point numbers and integers in Maxima
From: Stavros Macrakis
Date: Wed, 19 Dec 2007 11:32:40 -0500
On Dec 19, 2007 10:59 AM, Richard Fateman <fateman at cs.berkeley.edu> wrote:
> I guess I have to rethink the nformat code, at least with respect to
> dealing with numbers.
nformat(ex) must return a valid (though unsimplified) Maxima expression
which simplifies exactly to ex.
This is because it is used by all functions which work on the user-visible
representation of expressions, treating (e.g.) an expression like -(a-1)/b^2
as "-"("//"("-"(a,1),"^"(b,2))) rather than as its internal representation
"*"(-1,"+"(-1,a),"^"(b,-2)).
The affected functions include part, op, substpart, args, reverse, first,
rest, last, map, etc. -- anything affected by inflag.
-s