;;;; ;; Issues ;; ;; - `bigO' "near" 1. should be rounded for comparisons (module bigO (;export bigO bigO= bigO< bigO> bigO-compare) (import scheme) ;;; (define (log-with-base b) (let ((lnb (log b))) (lambda (n) (/ (log n) lnb) ) ) ) (define log10 (log-with-base 10)) ;;; ;; ;over fit? (define (bigO a) (inexact->exact (round (log10 a)))) (define (bigO-compare a b) (- (bigO a) (bigO b))) (define (bigO< a b) (negative? (bigO-compare a b))) (define (bigO= a b) (zero? (bigO-compare a b))) (define (bigO> a b) (positive? (bigO-compare a b))) ) ;module bigO