]> gitweb.factorcode.org Git - factor.git/blob - extra/math/approx/approx-tests.factor
Switch to https urls
[factor.git] / extra / math / approx / approx-tests.factor
1 ! Copyright (C) 2010 John Benediktsson.
2 ! See https://factorcode.org/license.txt for BSD license
3
4 USING: kernel math math.approx math.constants
5 math.floating-point sequences tools.test ;
6
7 { { 3 3 13/4 16/5 19/6 22/7 } }
8 [
9     pi double>ratio
10     { 1/2 1/4 1/8 1/16 1/32 1/64 }
11     [ approximate ] with map
12 ] unit-test
13
14 { { -3 -3 -13/4 -16/5 -19/6 -22/7 } }
15 [
16     pi double>ratio neg
17     { 1/2 1/4 1/8 1/16 1/32 1/64 }
18     [ approximate ] with map
19 ] unit-test