Single-round algebraic operations on configured binary values #
Each operation evaluates the descriptor-model operation through the storage codec. The packed, word and limb carriers share its exact arithmetic, exceptional-value policies and final rounding.
@[inline]
def
FloatLib.Floats.ExecFloat.Binary.rsqrt
{format : Formats.BinaryInterchange.FloatFormat}
{plan : Formats.BinaryInterchange.Configured.StoragePlan format}
{code : Type}
[ModelCodec plan (Formats.BinaryInterchange.Model format) code]
(value : Binary format.expWidth format.fracWidth format.encoding format.exponentBias ⋯ ⋯ ⋯ ⋯ plan code)
:
Binary format.expWidth format.fracWidth format.encoding format.exponentBias ⋯ ⋯ ⋯ ⋯ plan code
Reciprocal square root, with one final nearest-even rounding.
Instances For
@[inline]
def
FloatLib.Floats.ExecFloat.Binary.hypot
{format : Formats.BinaryInterchange.FloatFormat}
{plan : Formats.BinaryInterchange.Configured.StoragePlan format}
{code : Type}
[ModelCodec plan (Formats.BinaryInterchange.Model format) code]
(left right : Binary format.expWidth format.fracWidth format.encoding format.exponentBias ⋯ ⋯ ⋯ ⋯ plan code)
:
Binary format.expWidth format.fracWidth format.encoding format.exponentBias ⋯ ⋯ ⋯ ⋯ plan code
Euclidean norm, rounded once from the exact sum of squares.
Instances For
@[inline]
def
FloatLib.Floats.ExecFloat.Binary.powInt
{format : Formats.BinaryInterchange.FloatFormat}
{plan : Formats.BinaryInterchange.Configured.StoragePlan format}
{code : Type}
[ModelCodec plan (Formats.BinaryInterchange.Model format) code]
(value : Binary format.expWidth format.fracWidth format.encoding format.exponentBias ⋯ ⋯ ⋯ ⋯ plan code)
(exponent : ℤ)
:
Binary format.expWidth format.fracWidth format.encoding format.exponentBias ⋯ ⋯ ⋯ ⋯ plan code
Exact integer-exponent power followed by one rounding.
Instances For
@[inline]
def
FloatLib.Floats.ExecFloat.Binary.rootN
{format : Formats.BinaryInterchange.FloatFormat}
{plan : Formats.BinaryInterchange.Configured.StoragePlan format}
{code : Type}
[ModelCodec plan (Formats.BinaryInterchange.Model format) code]
(value : Binary format.expWidth format.fracWidth format.encoding format.exponentBias ⋯ ⋯ ⋯ ⋯ plan code)
(degree : ℤ)
:
Binary format.expWidth format.fracWidth format.encoding format.exponentBias ⋯ ⋯ ⋯ ⋯ plan code
Signed integer root, including reciprocal roots for negative degrees.