summaryrefslogtreecommitdiff
path: root/spec/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-17 01:24:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-17 01:24:25 +0000
commit90d065530784a110681ccef1326d63eac9cdc469 (patch)
tree4322a8eecf62e92b4a91aee7807401be9dca01ef /spec/ruby
parentf12cc0e6f798475e70860d8532d59d3fbc6af218 (diff)
compare with correct values
* spec/ruby/shared/rational/exponent.rb: compare with mathematically expected values without errors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby')
-rw-r--r--spec/ruby/shared/rational/exponent.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/shared/rational/exponent.rb b/spec/ruby/shared/rational/exponent.rb
index d361f345d5..f40f3c57d6 100644
--- a/spec/ruby/shared/rational/exponent.rb
+++ b/spec/ruby/shared/rational/exponent.rb
@@ -115,9 +115,9 @@ describe :rational_exponent, shared: true do
end
it "returns a complex number if self is negative and the passed argument is not 0" do
- (Rational(-3, 2) ** 1.5).should be_close(Complex(-3.374618290464398e-16, -1.8371173070873836), TOLERANCE)
- (Rational(3, -2) ** 1.5).should be_close(Complex(-3.374618290464398e-16, -1.8371173070873836), TOLERANCE)
- (Rational(3, -2) ** -1.5).should be_close(Complex(-9.998869008783402e-17, 0.5443310539518174), TOLERANCE)
+ (Rational(-3, 2) ** 1.5).should be_close(Complex(0.0, -1.8371173070873836), TOLERANCE)
+ (Rational(3, -2) ** 1.5).should be_close(Complex(0.0, -1.8371173070873836), TOLERANCE)
+ (Rational(3, -2) ** -1.5).should be_close(Complex(0.0, 0.5443310539518174), TOLERANCE)
end
it "returns Complex(1.0) when the passed argument is 0.0" do