diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-26 08:14:14 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-26 08:14:14 +0000 |
commit | 69c7312cb3337baa4a91817bdf73f2c9316d11c0 (patch) | |
tree | 91dce2eaad0ac582d4da9199314417249abd0406 /numeric.c | |
parent | 31667e5ffc1f99f745664ff7a80791ebb5875841 (diff) | |
download | ruby-69c7312cb3337baa4a91817bdf73f2c9316d11c0.tar.gz |
* numeric.c (fix_pow): returns 1.0 for 0**0.0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -2361,6 +2361,7 @@ fix_pow(VALUE x, VALUE y) x = rb_int2big(FIX2LONG(x)); return rb_big_pow(x, y); case T_FLOAT: + if (RFLOAT(y)->value == 0.0) return rb_float_new(1.0); if (a == 0) { return rb_float_new(RFLOAT(y)->value < 0 ? (1.0 / zero) : 0.0); } |