diff options
author | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-16 04:25:35 +0000 |
---|---|---|
committer | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-16 04:25:35 +0000 |
commit | affa0f845cb0d81e0d4a693766cb5875462b467d (patch) | |
tree | 7f4bef580bb1699e43a180c484ceb823ebf33a6f /rational.c | |
parent | ab9b7890c287ac55e7e261cbab1ed1664d9b66a8 (diff) | |
download | bundler-affa0f845cb0d81e0d4a693766cb5875462b467d.tar.gz |
complex.c: optimize Numeric#polar and Numeric#arg
* complex.c (numeric_polar): optimize for Integer, Float, and Rational.
* complex.c (numeric_arg): directly create the value of pi.
* complex.c (f_negative_p): optimize for Integer, Float, and Rational.
* rational.c (INT_NEGATIVE_P): move the definition into internal.h.
* internal.h (INT_NEGATIVE_P): ditto.
* numeric.c (rb_float_abs): rename from flo_abs and export to be used
from other source files..
* internal.h (rb_float_abs): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r-- | rational.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/rational.c b/rational.c index d9ff5ce344..0a120368c3 100644 --- a/rational.c +++ b/rational.c @@ -28,7 +28,6 @@ #define GMP_GCD_DIGITS 1 #define INT_POSITIVE_P(x) (FIXNUM_P(x) ? FIXNUM_POSITIVE_P(x) : BIGNUM_POSITIVE_P(x)) -#define INT_NEGATIVE_P(x) (FIXNUM_P(x) ? FIXNUM_NEGATIVE_P(x) : BIGNUM_NEGATIVE_P(x)) #define INT_ZERO_P(x) (FIXNUM_P(x) ? FIXNUM_ZERO_P(x) : rb_bigzero_p(x)) VALUE rb_cRational; |