1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

complex.c, rational.c: simplified macro conditions

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-03-07 02:27:18 +00:00
parent 125acf404b
commit 75d2bec7a9
2 changed files with 1 additions and 15 deletions

View file

@ -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);

View file

@ -429,10 +429,6 @@ f_rational_new_bang1(VALUE klass, VALUE x)
}
#ifdef CANONICALIZATION_FOR_MATHN
#define CANON
#endif
#ifdef CANON
static int canonicalization = 0;
RUBY_FUNC_EXPORTED void