[prev in list] [next in list] [prev in thread] [next in thread]
List: racket-users
Subject: [plt-scheme] Printing
From: jensaxel () soegaard ! net (=?ISO-8859-1?Q?Jens_Axel_S=F8gaard?=)
Date: 2005-10-15 8:17:19
Message-ID: 4350BB0F.1060403 () soegaard ! net
[Download RAW message or body]
Matt Jadud wrote:
> You could do:
>
> (define (decimal-places n places)
> (* 1.0 (/ (floor (* n (expt 10 places))) (expt 10 places))))
>
> ... or something similar. I thought there was some kind of interpolation
> library in Planet that allowed something like your first example? (I
> could be making that up, though.)
I am getting a deja vu.
Is this intended?
> (decimal-places -0.04 1)
-0.1
--
Jens Axel S?gaard
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic