From 90d065530784a110681ccef1326d63eac9cdc469 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 17 Jun 2018 01:24:25 +0000 Subject: 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 --- spec/ruby/shared/rational/exponent.rb | 6 +++--- 1 file 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 -- cgit v1.2.3