diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-06-05 09:09:50 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-06-05 09:09:50 +0900 |
| commit | 501f7f6027b99416b94f093bb30691c5ae43d7d0 (patch) | |
| tree | 825ecc404bafcd85eaa6562c303f468d06b3ccbf /src/math.c | |
| parent | 114168a551ffe4c429f9eeb2b2ccc09471b403a5 (diff) | |
| download | mruby-501f7f6027b99416b94f093bb30691c5ae43d7d0.tar.gz mruby-501f7f6027b99416b94f093bb30691c5ae43d7d0.zip | |
stop introducing Math::TORELANCE
Diffstat (limited to 'src/math.c')
| -rw-r--r-- | src/math.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/math.c b/src/math.c index eff2edcad..63daa58d1 100644 --- a/src/math.c +++ b/src/math.c @@ -10,10 +10,11 @@ #define domain_error(msg) \ mrb_raise(mrb, E_RANGE_ERROR, "Numerical argument is out of domain - " #msg); -#define MATH_TOLERANCE 1E-12 - /* math functions not provided under Microsoft Visual C++ */ #ifdef _MSC_VER + +#define MATH_TOLERANCE 1E-12 + #define asinh(x) log(x + sqrt(pow(x,2.0) + 1)) #define acosh(x) log(x + sqrt(pow(x,2.0) - 1)) #define atanh(x) (log(1+x) - log(1-x))/2.0 @@ -631,7 +632,6 @@ mrb_init_math(mrb_state *mrb) struct RClass *mrb_math; mrb_math = mrb_define_module(mrb, "Math"); - mrb_define_const(mrb, mrb_math, "TOLERANCE", mrb_float_value(MATH_TOLERANCE)); #ifdef M_PI mrb_define_const(mrb, mrb_math, "PI", mrb_float_value(M_PI)); #else |
