[prev in list] [next in list] [prev in thread] [next in thread] 

List:       racket-users
Subject:    [plt-scheme] Printing
From:       jmarshall () alum ! mit ! edu (Joe Marshall)
Date:       2005-10-16 4:49:48
Message-ID: c948168d0510152149y1a4a703ck27befb131ce909b9 () mail ! gmail ! com
[Download RAW message or body]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic