Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.3.1
-
Fix Version/s: JRuby 1.5
-
Component/s: RubySpec
-
Labels:None
-
Environment:jruby 1.4.0dev (ruby 1.8.7 patchlevel 174) (2009-09-27 704b415) (Java HotSpot(TM) Client VM 1.6.0_03) [i386-java]
-
Number of attachments :
Description
Three new mathn rubyspec failures on new specs:
[java] 6)
[java] Bignum#** returns a complex number when negative and raised to a fractional power FAILED
[java] Expected 1048576+1816186.90759734i to be within +/- 3.0e-05 of NaN
[java] /opt/work/jruby.git/spec/ruby/library/mathn/bignum/exponent_spec.rb:16
[java] /opt/work/jruby.git/spec/ruby/library/mathn/bignum/exponent_spec.rb:4
[java] /opt/work/jruby.git/spec/ruby/library/mathn/bignum/exponent_spec.rb:55:in `load'
[java]
[java] 7)
[java] Fixnum#** returns a complex number when negative and raised to a fractional power FAILED
[java] Expected 1+1.73205i to be within +/- 3.0e-05 of NaN
[java] /opt/work/jruby.git/spec/ruby/library/mathn/fixnum/exponent_spec.rb:12
[java] /opt/work/jruby.git/spec/ruby/library/mathn/fixnum/exponent_spec.rb:4
[java] /opt/work/jruby.git/spec/ruby/library/mathn/fixnum/exponent_spec.rb:55:in `load'
[java]
[java] 8)
[java] Float#** returns a complex number when negative and raised to a fractional power FAILED
[java] Expected 1+1.73205i to be within +/- 3.0e-05 of NaN
[java] /opt/work/jruby.git/spec/ruby/library/mathn/float/exponent_spec.rb:11
[java] /opt/work/jruby.git/spec/ruby/library/mathn/float/exponent_spec.rb:4
[java] /opt/work/jruby.git/spec/ruby/library/mathn/float/exponent_spec.rb:55:in `load'
[java]
Issue Links
- depends upon
-
JRUBY-4072
mathn/complex and mathn/rational should be implemented
-
Note that these should be really 1.9-only.
The failing tests look like this:
With 1.8.7, we get:
while with svn turnk, we get:
The attached patch partially solves this issue.
This is a partial fix, because: