summaryrefslogtreecommitdiffhomepage
path: root/test/t/math.rb
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2012-11-19 23:50:49 -0800
committerYukihiro "Matz" Matsumoto <[email protected]>2012-11-19 23:50:49 -0800
commit8894cbe00f6202e2088000d2a3e7553fa7730bad (patch)
treeaddcd268de098f5a77de7e18b4410bc7e3b1e098 /test/t/math.rb
parent4eee5ff50aa8bb6026fa40c4d5649a5e4b1437b9 (diff)
parent358f0cb5d8cb822644e29bad520b44d63c0d5666 (diff)
downloadmruby-8894cbe00f6202e2088000d2a3e7553fa7730bad.tar.gz
mruby-8894cbe00f6202e2088000d2a3e7553fa7730bad.zip
Merge pull request #563 from xxuejie/master
Fix manual implementations of erf and erfc functions
Diffstat (limited to 'test/t/math.rb')
-rw-r--r--test/t/math.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/t/math.rb b/test/t/math.rb
index d71e44fc9..780b805d2 100644
--- a/test/t/math.rb
+++ b/test/t/math.rb
@@ -113,5 +113,13 @@ if Object.const_defined?(:Math)
assert('Math.erfc 1') do
check_float(Math.erfc(1), 0.157299207050285)
end
+
+ assert('Math.erf -1') do
+ check_float(Math.erf(-1), -0.8427007929497148)
+ end
+
+ assert('Math.erfc -1') do
+ check_float(Math.erfc(-1), 1.8427007929497148)
+ end
end