[plt-scheme] Printing

From: Joe Marshall (jmarshall at alum.mit.edu)
Date: Sun Oct 16 00:49:48 EDT 2005

I used round (rather than something else) because it is for formatting.
The number itself is of whatever precision (double or whatnot) and
you just want to print the first few digits.  If you wanted maximum
precision, you'd presumably print the entire digit string.


On 10/15/05, Jens Axel Søgaard <jensaxel at soegaard.net> wrote:
>   > (format-float -0.5 0)
>   "0."
>   > (format-float -0.05 1)
>   "-.1"
>   > (format-float -0.005 2)
>   ".-1"                           ; ?
>   > (format-float -0.0005 3)
>   "0.0-1"
>   > (format-float -0.0005 4)

Hmmm.  Looks like I should have been more thorough.
I only needed it for 2 and 3 digits of precision on positive
numbers.  A fix shortly.


--
~jrm


Posted on the users mailing list.