summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-30 10:44:02 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-30 10:44:02 +0000
commit9db87ea5b9c10b80f3e9f1bc83c78527ad137ef0 (patch)
tree593ecf9f02646b0d4337ff13c0d73c45d5067509 /numeric.c
parent499bf746da00eab7b0fc365bec0e791f1ca2b203 (diff)
* 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
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/numeric.c b/numeric.c
index 319f7b2c48..9fdbadf832 100644
--- a/numeric.c
+++ b/numeric.c
@@ -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);