mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* numeric.c (SQRT_LONG_MAX): use SIZEOF_LONG instead of SIZEOF_VALUE
because SIZEOF_VALUE > SIZEOF_LONG on some platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6a9b9f488b
commit
6cca1f4c6a
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Aug 31 07:12:24 2007 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* numeric.c (SQRT_LONG_MAX): use SIZEOF_LONG instead of SIZEOF_VALUE
|
||||
because SIZEOF_VALUE > SIZEOF_LONG on some platforms.
|
||||
|
||||
Fri Aug 31 04:18:03 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* parse.y (f_norm_arg, f_arg_item): not croak already erred names.
|
||||
|
|
|
@ -2046,7 +2046,7 @@ fix_minus(VALUE x, VALUE y)
|
|||
* result.
|
||||
*/
|
||||
|
||||
#define SQRT_LONG_MAX ((SIGNED_VALUE)1<<((SIZEOF_VALUE*CHAR_BIT-1)/2))
|
||||
#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))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue