printing floats (1/3), was: minor strangeness in cvs head maxima
Subject: printing floats (1/3), was: minor strangeness in cvs head maxima
From: Robert Dodier
Date: Wed, 12 Oct 2005 08:43:37 -0600
Hello,
At Ray's request I'm forwarding our recent correspondence
about printing floating point numbers.
Robert> An unrelated item -- entering 1.0 => 1. output. I don't
think it used
Robert> to be like that.
Robert> 1.0 => 1.0 in Maxima 5.9.2 / gcl & clisp,
Robert> 1.0 => 1. in Maxima 5.9.1 cvs / clisp & sbcl.
Ray> Ah, I see that. That was caused by my change for fortran(foo) so that
Ray> all numbers are printed in double precision, with an explicit exponent
Ray> marker. When not printing fortran, we use ~g now instead of ~f, which
Ray> doesn't print a trailing zero. But I see that's a problem because
Ray> "1." is read back in as the integer 1. I don't think we want that.
Ray> Either we print 1.0 or read 1. as 1.0.
My comment at this point -- I think I'd much rather see 1.0 printed.
Robert Dodier