diff options
author | Xuejie Xiao <xxuejie@gmail.com> | 2012-11-19 15:52:26 -0500 |
---|---|---|
committer | Xuejie Xiao <xxuejie@gmail.com> | 2012-11-19 15:52:26 -0500 |
commit | 9be35831f0741070e495622e6c7ba51fbbb6475c (patch) | |
tree | e4f479962d094dbfc237737aa088894bd9d3517f /tests | |
parent | 357e70c0481081e92ac458f291afd038aab92788 (diff) |
Add erf and erfc implementations
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/runner.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index de964809..99af7109 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -1450,6 +1450,24 @@ c5,de,15,8a ''' self.do_run(src, '*3.14,-3.14,1,0,0,0,1,0,1,1,0,2,3,0.0,1.0,0.0,1.0*') + def test_erf(self): + src = ''' + #include <math.h> + #include <stdio.h> + int main() + { + printf("%1.6f, %1.6f, %1.6f, %1.6f, %1.6f, %1.6f\\n", + erf(1.0), + erf(3.0), + erf(-1.0), + erfc(1.0), + erfc(3.0), + erfc(-1.5)); + return 0; + } + ''' + self.do_run(src, '0.842701, 0.999978, -0.842701, 0.157299, 0.000022, 1.966105') + def test_math_hyperbolic(self): src = open(path_from_root('tests', 'hyperbolic', 'src.c'), 'r').read() expected = open(path_from_root('tests', 'hyperbolic', 'output.txt'), 'r').read() |