struct Float64

Defined in:

monkeypatches/float.cr

Constant 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

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)


[View source]
def self.cap_extremes(value : Float64, alt_nan = Float64.new(0), alt_infin_pos = HIGH_ENOUGH_FOR_NETS, alt_infin_neg = -HIGH_ENOUGH_FOR_NETS) #

[View source]