() gu...@mails.selgrad.org
() Mon, 28 Dec 2009 18:02:36 +0100

   Maybe someone can comment on this

(define (cents f)
  (remainder (inexact->exact (truncate (* 100 f))) 100))

Here, `truncate' is preferred because (floor -12.34) => -13.0.

Note, however, that usually it is better (less fiddly)
to represent monetary values as integers.

thi


Reply via email to