[1.9] Domain errors on Math.log(0), Math.log2(0), Math.log10(0), Math.atanh(1),
Math.atanh(-1)
----------------------------------------------------------------------------------------------
Key: JRUBY-3947
URL: http://jira.codehaus.org/browse/JRUBY-3947
Project: JRuby
Issue Type: Bug
Components: Ruby 1.9
Environment: github trunk, Mac OS X 10.6, Java 6
Reporter: Hiro Asari
Assignee: Thomas E Enebo
Attachments: 0001-1.9-Domain-error-on-Math.log-and-Math.atanh.patch
These functions changed behavior (correctly, mathematically speaking) in 1.9.
The accompanying patch addresses this problem. However, I am not sure if this
is worth it. :-/
Incidentally, Math.log() now takes an optional second argument as the base of
the logarithm. The patch also addresses this change of behavior.
This this patch, Math module now passes all the tests defined in
test/externals/ruby1.9/ruby/test_math.rb, while passing the 1.8 spec.
{noformat}
surfboard:jruby[git:personal]$ bin/jruby -v --1.9
test/externals/ruby1.9/ruby/test_math.rb
jruby 1.4.0dev (ruby 1.9.1p0) (2009-09-03 58a1a7d) (Java HotSpot(TM) Client VM
1.6.0_15) [i386-java]
/Users/asari/Development/src/jruby/lib/ruby/1.9/test/unit/assertions.rb:31
warning: shadowing outer local variable - line
Loaded suite test/externals/ruby1.9/ruby/test_math
Started
..........................
Finished in 0.136000 seconds.
26 tests, 134 assertions, 0 failures, 0 errors, 0 skips
{noformat}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email