diff options
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -2081,6 +2081,10 @@ fix_minus(VALUE x, VALUE y) } } +#define SQRT_LONG_MAX ((SIGNED_VALUE)1<<((SIZEOF_LONG*CHAR_BIT-1)/2)) +/*tests if N*N would overflow*/ +#define FIT_SQRT_LONG(n) (((n)<SQRT_LONG_MAX)&&((n)>=-SQRT_LONG_MAX)) + /* * call-seq: * fix * numeric => numeric_result @@ -2090,10 +2094,6 @@ fix_minus(VALUE x, VALUE y) * result. */ -#define SQRT_LONG_MAX ((SIGNED_VALUE)1<<((SIZEOF_LONG*CHAR_BIT-1)/2)) -/*tests if N*N would overflow*/ -#define FIT_SQRT_LONG(n) (((n)<SQRT_LONG_MAX)&&((n)>=-SQRT_LONG_MAX)) - static VALUE fix_mul(VALUE x, VALUE y) { |