19 Mai
2007
19 Mai
'07
23:28
Marc: The compiler can expand (sqrt x) as (define (sqrt x) (cond ((##fixnum? x) (if (and (##fixnum.<= 0 x) (or (##not (##fixnum? 4294967296)) ; 32-bit fixnums (##fixnum.<= x 4503599627370496))) (##flonum->fixnum (##flonum.sqrt (##flonum.<-fixnum x))) (##sqrt x))) ((and (##flonum? x) (##flonum.<= 0. x)) (##flonum.sqrt x)) (else (##sqrt x)))) It's very worthwhile for some programs (and some micro-benchmarks ;-). Brad