From racket-users Sat Oct 15 08:17:19 2005 From: jensaxel () soegaard ! net (=?ISO-8859-1?Q?Jens_Axel_S=F8gaard?=) Date: Sat, 15 Oct 2005 08:17:19 +0000 To: racket-users Subject: [plt-scheme] Printing Message-Id: <4350BB0F.1060403 () soegaard ! net> X-MARC-Message: https://marc.info/?l=racket-users&m=139305339314935 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