Open guyboertje opened 6 years ago
My 2 cents... I think Float::INFINITY
and Float::NAN
should be handled as error conditions. Adding two extremely large numbers will always a be a number and never reach infinity.
I would argue that Ruby is wrong here if you can get get anything other a then a number or error out of the 4 basic math functions (with discrete numbers as input).
The current specs assert that a result is
Infinity
but the JSON spec forbids them.How should we validate results of
Float::INFINITY
andFloat::NAN
before we set the result into the event?