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 | 78a96b6c32c8abe896c56dfca1c3029c29110428 (patch) | |
tree | e77dc6f979d33151e70a71a61a65e5f855d4f4fc /complex.c | |
parent | 7518f9fd40b0e5c9c0685e52b1cb1a4e4f528040 (diff) | |
download | ruby-78a96b6c32c8abe896c56dfca1c3029c29110428.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); |