I'm just going through the O(N^2) parts of my image smoothing codes and listing the things that come up.
Brad
1. (sqrt x)
=>
(if (and (##flonum? x) (##flonum.<= 0. x)) ;; OK for infinities and NaNs (##flonum.sqrt x) (sqrt x))
2. (max x y)
=>
(cond ((and (##fixnum? x) (##fixnum? y)) (##fixnum.max x y)) ((and (##flonum? x) (##flonum? y)) (##flonum.max x y)) (else (max x y)))
3. Same for min.
Afficher les réponses par date