On Thu, Oct 30, 2008 at 2:32 AM, Marc Feeley feeley@iro.umontreal.ca wrote:
(define (f0 x) ;; 4600 ns per call (declare (standard-bindings)) (inexact->exact (truncate x)))
(define (f1 x) ;; 4000 ns per call (declare (standard-bindings)) (truncate (inexact->exact x)))
This is *really* interesting w/rt the implementation model of floats. I would guess that this means that inexact->exact just flips an exactness bit in Gambit's float representation, no? I would have thought that truncating an exact rational would be rather expensive in comparison to normalizing a floating integer. I'd think that truncating a float would be relatively cheap.
What's really going on here?
david