From f7dd27a92827af91aa52c78bfbf96d5f7e73c4bd Mon Sep 17 00:00:00 2001 From: Xuejie Xiao Date: Mon, 19 Nov 2012 15:13:18 -0500 Subject: Fix provided implementation of erf and erfc functions. --- test/t/math.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/t/math.rb b/test/t/math.rb index d71e44fc9..e582c0166 100644 --- a/test/t/math.rb +++ b/test/t/math.rb @@ -110,8 +110,12 @@ if Object.const_defined?(:Math) check_float(Math.erf(1), 0.842700792949715) end - assert('Math.erfc 1') do - check_float(Math.erfc(1), 0.157299207050285) + 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 -- cgit v1.2.3