;;;; ;; Issues ;; ;; - `bigO' "near" 1. should be rounded for comparisons (module bigO (;export bigO bigO= bigO< bigO> bigO-compare) (import scheme) ;;; ;from mathh.scm (define (log-with-base b) (let ((lnb (log b))) (lambda (n) (/ (log n) lnb) ) ) ) (define log10 (log-with-base 10)) ;;; ;; (define (bigO a) (floor (log10 a))) (define (bigO< a b) (< (bigO a) (bigO b))) (define (bigO= a b) (= (bigO a) (bigO b))) (define (bigO> a b) (bigO< b a)) (define (bigO-compare a b) (cond ((bigO< a b) -1) ((bigO= a b) 0) (else 1))) ) ;module bigO