added more examples and tests for order-of-magnitude

svn: r17212
This commit is contained in:
Robby Findler 2009-12-05 20:38:38 +00:00
parent 1a8bca736f
commit ada899f158
2 changed files with 6 additions and 2 deletions

View File

@ -955,11 +955,13 @@ Computes the greatest exact integer @scheme[m] such that:
(inexact->exact r))]
Hence also
@schemeblock[(< (inexact->exact r)
(expt 10 (add1 m)))].
(expt 10 (add1 m)))]
@mz-examples[#:eval math-eval
(order-of-magnitude 999)
(order-of-magnitude 1000)]
(order-of-magnitude 1000)
(order-of-magnitude 1/100)
(order-of-magnitude 1/101)]
}
@; ----------------------------------------------------------------------

View File

@ -14,6 +14,8 @@
(test 3 order-of-magnitude 5000)
(test 3 order-of-magnitude 9999)
(test 4 order-of-magnitude 10000)
(test -2 order-of-magnitude 1/100)
(test -3 order-of-magnitude 1/101)
(test 25 sqr 5)
(test 25 sqr -5)