Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

FloatDomainError: NaN #1

Closed
tarcieri opened this Issue · 1 comment

2 participants

@tarcieri

I'm getting this consistently across multiple Ruby implementations benchmarking Celluloid's UUID implementation. I hope that means it's roflscale.

Repro:

clone git://github.com/celluloid/celluloid.git
bundle
ruby benchmarks/uuid.rb

I get:

Calculating -------------------------------------
                uuid     22819 i/100ms
-------------------------------------------------
                uuidI, [2012-03-24T16:45:12.456314 #66670]  INFO -- : Shutdown completed cleanly
/Users/tony/.rvm/gems/ruby-1.9.3-p125/gems/benchmark-ips-1.1.0/lib/benchmark/ips.rb:239:in `round': NaN (FloatDomainError)
    from /Users/tony/.rvm/gems/ruby-1.9.3-p125/gems/benchmark-ips-1.1.0/lib/benchmark/ips.rb:239:in `block in ips'
    from /Users/tony/.rvm/gems/ruby-1.9.3-p125/gems/benchmark-ips-1.1.0/lib/benchmark/ips.rb:201:in `each'
    from /Users/tony/.rvm/gems/ruby-1.9.3-p125/gems/benchmark-ips-1.1.0/lib/benchmark/ips.rb:201:in `ips'
    from benchmarks/uuid.rb:8:in `<main>'

Or on rbx:

An exception occurred running benchmarks/uuid.rb
    Numerical argument out of domain - sqrt (Errno::EDOM)

Or on JRuby:

Math::DomainError: Numerical argument is out of domain - "sqrt"
    sqrt at org/jruby/RubyMath.java:494
@evanphx evanphx closed this in be40b0e
@tarcieri

Just found the root cause of this, if you're curious:

celluloid/celluloid@d5ff2e2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.