1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

6 commits

Author SHA1 Message Date
matz
7f0bb427e0 * numeric.c (fix_pow): integer power calculation: 0**n => 0,
1**n => 1, -1**n => 1 (n: even) / -1 (n: odd).

* test/ruby/test_fixnum.rb (TestFixnum::test_pow): update test
  suite.  pow(-3, 2^64) gives NaN when pow(3, 2^64) gives Inf.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-14 14:31:21 +00:00
akr
d2113feba8 more tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-13 10:21:50 +00:00
akr
c6818f4104 check (-0x4000000000000000)/(-1) too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-13 09:35:29 +00:00
akr
c393603f94 add test for [ruby-dev:31210].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-13 09:33:17 +00:00
akr
8f79c623f3 add tests for [ruby-dev:31189] and [ruby-dev:31190].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-12 13:23:29 +00:00
usa
a0d50fa3c4 * numeric.c (int_pow): fix previous nubu's commit.
* test/ruby/test_fixnum.rb: new test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-05 07:38:41 +00:00