added more examples and tests for order-of-magnitude
svn: r17212
This commit is contained in:
parent
1a8bca736f
commit
ada899f158
|
@ -955,11 +955,13 @@ Computes the greatest exact integer @scheme[m] such that:
|
||||||
(inexact->exact r))]
|
(inexact->exact r))]
|
||||||
Hence also
|
Hence also
|
||||||
@schemeblock[(< (inexact->exact r)
|
@schemeblock[(< (inexact->exact r)
|
||||||
(expt 10 (add1 m)))].
|
(expt 10 (add1 m)))]
|
||||||
|
|
||||||
@mz-examples[#:eval math-eval
|
@mz-examples[#:eval math-eval
|
||||||
(order-of-magnitude 999)
|
(order-of-magnitude 999)
|
||||||
(order-of-magnitude 1000)]
|
(order-of-magnitude 1000)
|
||||||
|
(order-of-magnitude 1/100)
|
||||||
|
(order-of-magnitude 1/101)]
|
||||||
}
|
}
|
||||||
|
|
||||||
@; ----------------------------------------------------------------------
|
@; ----------------------------------------------------------------------
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
(test 3 order-of-magnitude 5000)
|
(test 3 order-of-magnitude 5000)
|
||||||
(test 3 order-of-magnitude 9999)
|
(test 3 order-of-magnitude 9999)
|
||||||
(test 4 order-of-magnitude 10000)
|
(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)
|
||||||
(test 25 sqr -5)
|
(test 25 sqr -5)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user