[前][次][番号順一覧][スレッド一覧]

ruby-changes:51467

From: nobu <ko1@a...>
Date: Sun, 17 Jun 2018 10:24:35 +0900 (JST)
Subject: [ruby-changes:51467] nobu:r63677 (trunk): compare with correct values

nobu	2018-06-17 10:24:25 +0900 (Sun, 17 Jun 2018)

  New Revision: 63677

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63677

  Log:
    compare with correct values
    
    * spec/ruby/shared/rational/exponent.rb: compare with
      mathematically expected values without errors.

  Modified files:
    trunk/spec/ruby/shared/rational/exponent.rb
Index: spec/ruby/shared/rational/exponent.rb
===================================================================
--- spec/ruby/shared/rational/exponent.rb	(revision 63676)
+++ spec/ruby/shared/rational/exponent.rb	(revision 63677)
@@ -115,9 +115,9 @@ describe :rational_exponent, shared: tru https://github.com/ruby/ruby/blob/trunk/spec/ruby/shared/rational/exponent.rb#L115
     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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]