module Float::Printer::IEEE

Extended Modules

Defined in:

float/printer/ieee.cr

Constant Summary

DENORMAL_EXPONENT_32 = (-EXPONENT_BIAS_32) + 1
DENORMAL_EXPONENT_64 = (-EXPONENT_BIAS_64) + 1
EXPONENT_BIAS_32 = 127 + PHYSICAL_SIGNIFICAND_SIZE_32
EXPONENT_BIAS_64 = 1023 + PHYSICAL_SIGNIFICAND_SIZE_64
EXPONENT_MASK_32 = 2139095040_u32
EXPONENT_MASK_64 = 9218868437227405312_u64
HIDDEN_BIT_32 = 8388608_u32
HIDDEN_BIT_64 = 4503599627370496_u64
PHYSICAL_SIGNIFICAND_SIZE_32 = 23
PHYSICAL_SIGNIFICAND_SIZE_64 = 52
SIGN_MASK_32 = 2147483648_u32
SIGN_MASK_64 = 9223372036854775808_u64
SIGNIFICAND_MASK_32 = 8388607_u32
SIGNIFICAND_MASK_64 = 4503599627370495_u64
SIGNIFICAND_SIZE_32 = 24

Excludes the hidden bit

SIGNIFICAND_SIZE_64 = 53

Excludes the hidden bit

Instance Method Summary

Instance Method Detail

def frac_and_exp(v : Float64) #

[View source]
def frac_and_exp(v : Float32) #

[View source]
def inf?(d64 : UInt64) #

[View source]
def inf?(d32 : UInt32) #

[View source]
def nan?(d64 : UInt64) #

[View source]
def nan?(d32 : UInt32) #

[View source]
def normalized_boundaries(v : Float64) #

Computes the two boundaries of v. The bigger boundary (m_plus) is normalized. The lower boundary has the same exponent as m_plus. Precondition: the value encoded by this Flaot must be greater than 0.


[View source]
def normalized_boundaries(v : Float32) #

[View source]
def sign(d64 : UInt64) #

[View source]
def sign(d32 : UInt32) #

[View source]
def special?(d64 : UInt64) #

[View source]
def special?(d32 : UInt32) #

[View source]
def to_uint(v : Float64) #

[View source]
def to_uint(v : Float32) #

[View source]