diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-07 02:27:18 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-07 02:27:18 +0000 |
commit | 75d2bec7a9b586e3c3767a11c8409622f57a47ac (patch) | |
tree | e77dc6f979d33151e70a71a61a65e5f855d4f4fc /complex.c | |
parent | 125acf404b9878fe3ba0dae763ab2395bc85ad48 (diff) | |
download | bundler-75d2bec7a9b586e3c3767a11c8409622f57a47ac.tar.gz |
complex.c, rational.c: simplified macro conditions
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'complex.c')
-rw-r--r-- | complex.c | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -329,10 +329,6 @@ f_complex_new_bang2(VALUE klass, VALUE x, VALUE y) } #ifdef CANONICALIZATION_FOR_MATHN -#define CANON -#endif - -#ifdef CANON static int canonicalization = 0; RUBY_FUNC_EXPORTED void @@ -358,15 +354,9 @@ nucomp_real_check(VALUE num) inline static VALUE nucomp_s_canonicalize_internal(VALUE klass, VALUE real, VALUE imag) { -#ifdef CANON -#define CL_CANON -#ifdef CL_CANON +#ifdef CANONICALIZATION_FOR_MATHN if (k_exact_zero_p(imag) && canonicalization) return real; -#else - if (f_zero_p(imag) && canonicalization) - return real; -#endif #endif if (f_real_p(real) && f_real_p(imag)) return nucomp_s_new_internal(klass, real, imag); |