Skip to content

Instantly share code, notes, and snippets.

@ChrisBr
Created March 21, 2018 20:51
Show Gist options
  • Save ChrisBr/4d91b2df8281e8261fbe12838118a1d5 to your computer and use it in GitHub Desktop.
Save ChrisBr/4d91b2df8281e8261fbe12838118a1d5 to your computer and use it in GitHub Desktop.
# https://github.com/ruby/ruby/commit/22263722689c7b5a7a1658a65e8ed713aa921e21#diff-347f10a1abb5b6f87bc8fe155cf63a3eR1351
# https://github.com/ruby/ruby/commit/885c16c1d6d3115a8f88ad197f7f7850cebdb344#diff-dd84e80b48a63947114c911553b358e0R837
# https://github.com/jruby/jruby/blob/807900a0478fd4d9a5509eb4ad1172a1a89a2c1e/core/src/main/java/org/jruby/RubyComplex.java#L1013
c = Complex(Float::MAX, Float::MAX)
puts c.finite?
puts c.magnitude
puts c.magnitude.finite?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment