summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-08-01 01:23:34 +0900
committerYukihiro Matsumoto <[email protected]>2012-08-01 01:23:34 +0900
commit883b97ab05ac8e509ff575c0c8533066f7e900c7 (patch)
treec4274a2af986c42fc1f586816d27fa10f95a05d6
parent34cf05679c5ce9ee40be6bd4ccace0ec94fcebdf (diff)
downloadmruby-883b97ab05ac8e509ff575c0c8533066f7e900c7.tar.gz
mruby-883b97ab05ac8e509ff575c0c8533066f7e900c7.zip
some test requires double precision
-rw-r--r--src/math.c2
-rw-r--r--test/t/math.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/math.c b/src/math.c
index fe10848c3..9aae87acd 100644
--- a/src/math.c
+++ b/src/math.c
@@ -647,7 +647,7 @@ mrb_init_math(mrb_state *mrb)
#endif
#ifdef MRB_USE_FLOAT
- mrb_define_const(mrb, mrb_math, "TOLERANCE", mrb_float_value(1e-6));
+ mrb_define_const(mrb, mrb_math, "TOLERANCE", mrb_float_value(1e-5));
#else
mrb_define_const(mrb, mrb_math, "TOLERANCE", mrb_float_value(1e-12));
#endif
diff --git a/test/t/math.rb b/test/t/math.rb
index 025551b82..d71e44fc9 100644
--- a/test/t/math.rb
+++ b/test/t/math.rb
@@ -12,7 +12,7 @@ if Object.const_defined?(:Math)
assert('Fundamental trig identities') do
result = true
- N = 15
+ N = 13
N.times do |i|
a = Math::PI / N * i
ca = Math::PI / 2 - a