* include/ruby/defines.h (INFINITY): this is float.
* include/ruby/defines.h (NAN): ditto. * numericc.c (rb_infinity): change content as float. * numericc.c (rb_nan): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
499bf746da
commit
9db87ea5b9
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
Wed Dec 30 19:40:00 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* include/ruby/defines.h (INFINITY): this is float.
|
||||||
|
|
||||||
|
* include/ruby/defines.h (NAN): ditto.
|
||||||
|
|
||||||
|
* numericc.c (rb_infinity): change content as float.
|
||||||
|
|
||||||
|
* numericc.c (rb_nan): ditto.
|
||||||
|
|
||||||
Wed Dec 30 17:59:14 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Dec 30 17:59:14 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* gem_prelude.rb (push_all_highest_version_gems_on_load_path):
|
* gem_prelude.rb (push_all_highest_version_gems_on_load_path):
|
||||||
|
@ -102,15 +102,17 @@ void xfree(void*);
|
|||||||
#ifdef INFINITY
|
#ifdef INFINITY
|
||||||
# define HAVE_INFINITY
|
# define HAVE_INFINITY
|
||||||
#else
|
#else
|
||||||
|
/** @internal */
|
||||||
extern const unsigned char rb_infinity[];
|
extern const unsigned char rb_infinity[];
|
||||||
# define INFINITY (*(double *)rb_infinity)
|
# define INFINITY (*(float *)rb_infinity)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NAN
|
#ifdef NAN
|
||||||
# define HAVE_NAN
|
# define HAVE_NAN
|
||||||
#else
|
#else
|
||||||
|
/** @internal */
|
||||||
extern const unsigned char rb_nan[];
|
extern const unsigned char rb_nan[];
|
||||||
# define NAN (*(double *)rb_nan)
|
# define NAN (*(float *)rb_nan)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
|
@ -65,16 +65,16 @@
|
|||||||
|
|
||||||
#ifdef HAVE_INFINITY
|
#ifdef HAVE_INFINITY
|
||||||
#elif BYTE_ORDER == LITTLE_ENDIAN
|
#elif BYTE_ORDER == LITTLE_ENDIAN
|
||||||
const unsigned char rb_infinity[] = "\x00\x00\x00\x00\x00\x00\xf0\x7f";
|
const unsigned char rb_infinity[] = "\x00\x00\x80\x7f";
|
||||||
#else
|
#else
|
||||||
const unsigned char rb_infinity[] = "\x7f\xf0\x00\x00\x00\x00\x00\x00";
|
const unsigned char rb_infinity[] = "\x7f\x80\x00\x00";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_NAN
|
#ifdef HAVE_NAN
|
||||||
#elif BYTE_ORDER == LITTLE_ENDIAN
|
#elif BYTE_ORDER == LITTLE_ENDIAN
|
||||||
const unsigned char rb_nan[] = "\x00\x00\x00\x00\x00\x00\xf8\x7f";
|
const unsigned char rb_nan[] = "\x00\x00\xc0\x7f";
|
||||||
#else
|
#else
|
||||||
const unsigned char rb_nan[] = "\x7f\xf8\x00\x00\x00\x00\x00\x00";
|
const unsigned char rb_nan[] = "\x7f\xc0\x00\x00";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern double round(double);
|
extern double round(double);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user