Skip to content

Fix #645 by calling Java Math.cbrt directly.#656

Merged
headius merged 1 commit intojruby:masterfrom
tychobrailleur:cbrt
Apr 25, 2013
Merged

Fix #645 by calling Java Math.cbrt directly.#656
headius merged 1 commit intojruby:masterfrom
tychobrailleur:cbrt

Conversation

@tychobrailleur
Copy link
Contributor

This fixed #645 by calling java.lang.Math.cbrt directly. Math.cbrt was introduced in Java 5, so it is safe to use in the JRuby codebase. Also, cbrt now throws a TypeError if the argument cannot be coerced to Float.

Related rubyspec change: https://github.com/rubyspec/rubyspec/pull/206

headius added a commit that referenced this pull request Apr 25, 2013
Fix #645 by calling Java Math.cbrt directly.
@headius headius merged commit 62b9e1d into jruby:master Apr 25, 2013
@d1egoaz
Copy link

d1egoaz commented Apr 25, 2013

Tks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Behavior of Jruby Math.cbrt(number) does not match MRI

3 participants