ruby-changes:14372
From: naruse <ko1@a...>
Date: Wed, 30 Dec 2009 19:48:39 +0900 (JST)
Subject: [ruby-changes:14372] Ruby:r26202 (trunk): * include/ruby/defines.h (INFINITY): this is float.
naruse 2009-12-30 19:44:02 +0900 (Wed, 30 Dec 2009) New Revision: 26202 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26202 Log: * 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. Modified files: trunk/ChangeLog trunk/include/ruby/defines.h trunk/numeric.c Index: include/ruby/defines.h =================================================================== --- include/ruby/defines.h (revision 26201) +++ include/ruby/defines.h (revision 26202) @@ -102,15 +102,17 @@ #ifdef INFINITY # define HAVE_INFINITY #else +/** @internal */ extern const unsigned char rb_infinity[]; -# define INFINITY (*(double *)rb_infinity) +# define INFINITY (*(float *)rb_infinity) #endif #ifdef NAN # define HAVE_NAN #else +/** @internal */ extern const unsigned char rb_nan[]; -# define NAN (*(double *)rb_nan) +# define NAN (*(float *)rb_nan) #endif #ifdef __CYGWIN__ Index: ChangeLog =================================================================== --- ChangeLog (revision 26201) +++ ChangeLog (revision 26202) @@ -1,3 +1,13 @@ +Wed Dec 30 19:40:00 2009 NARUSE, Yui <naruse@r...> + + * 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@r...> * gem_prelude.rb (push_all_highest_version_gems_on_load_path): Index: numeric.c =================================================================== --- numeric.c (revision 26201) +++ numeric.c (revision 26202) @@ -65,16 +65,16 @@ #ifdef HAVE_INFINITY #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 -const unsigned char rb_infinity[] = "\x7f\xf0\x00\x00\x00\x00\x00\x00"; +const unsigned char rb_infinity[] = "\x7f\x80\x00\x00"; #endif #ifdef HAVE_NAN #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 -const unsigned char rb_nan[] = "\x7f\xf8\x00\x00\x00\x00\x00\x00"; +const unsigned char rb_nan[] = "\x7f\xc0\x00\x00"; #endif extern double round(double); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/