Module half::consts [] [src]

Useful f16 constants.

Constants

DIGITS

16-bit equivalent of std::f32::DIGITS

E

Euler's number.

EPSILON

16-bit floating point epsilon. 9.7656e-4

FRAC_1_PI

1.0/pi

FRAC_1_SQRT_2

1.0/sqrt(2.0)

FRAC_2_PI

2.0/pi

FRAC_2_SQRT_PI

2.0/sqrt(pi)

FRAC_PI_2

pi/2.0

FRAC_PI_3

pi/3.0

FRAC_PI_4

pi/4.0

FRAC_PI_6

pi/6.0

FRAC_PI_8

pi/8.0

INFINITY

16-bit positive infinity.

LN_2

ln(2.0)

LN_10

ln(10.0)

LOG10_E

log10(e)

LOG2_E

log2(e)

MANTISSA_DIGITS

16-bit equivalent of std::f32::MANTISSA_DIGITS

MAX

Largest finite f16 value. 65504

MAX_10_EXP

16-bit equivalent of std::f32::MAX_10_EXP

MAX_EXP

16-bit equivalent of std::f32::MAX_EXP

MAX_SUBNORMAL

16-bit maximum subnormal value. Approx. 6.09756e−5

MIN

Smallest finite f16 value.

MIN_10_EXP

16-bit equivalent of std::f32::MIN_10_EXP

MIN_EXP

16-bit equivalent of std::f32::MIN_EXP

MIN_POSITIVE

Smallest positive, normalized f16 value. Approx. 6.10352e−5

MIN_POSITIVE_SUBNORMAL

16-bit minimum positive subnormal value. Approx. 5.96046e−8

NAN

16-bit NaN.

NEG_INFINITY

16-bit negative infinity.

NEG_ZERO

16-bit floating point -0.0

ONE

16-bit floating point 1.0

PI

Archimedes' constant.

RADIX

16-bit equivalent of std::f32::RADIX

SQRT_2

sqrt(2)

ZERO

16-bit floating point 0.0