struct Float64
- Float64
- Float
- Number
- Value
- Object
Defined in:
monkeypatches/float.crConstant Summary
-
HIGH_ENOUGH_FOR_NETS =
Math.sqrt(Float64::MAX)
-
These nets don't need huge numbers, so for sake a nets, we can set an artificial max (aka 'HIGH_ENOUGH_FOR_NETS'):
Class Method Summary
-
.avoid_extremes(value : Float64, alt_nan = Float64.new(0), alt_infin_pos = HIGH_ENOUGH_FOR_NETS, alt_infin_neg = -HIGH_ENOUGH_FOR_NETS)
Float64.avoid_extremes(value)
- .cap_extremes(value : Float64, alt_nan = Float64.new(0), alt_infin_pos = HIGH_ENOUGH_FOR_NETS, alt_infin_neg = -HIGH_ENOUGH_FOR_NETS)
Class Method Detail
def self.avoid_extremes(value : Float64, alt_nan = Float64.new(0), alt_infin_pos = HIGH_ENOUGH_FOR_NETS, alt_infin_neg = -HIGH_ENOUGH_FOR_NETS)
#
Float64.avoid_extremes(value)