TorchLean API

FloatLib.Floats.Formats.BinaryInterchange.Operations.Square

Once-rounded binary squares #

Model.square uses one operand decode in the specialized product kernels and returns exactly the complete encoding of Model.mul x x. The descriptor's rounding, overflow, zero, and NaN policies therefore apply at every width.

@[inline]

Square with one nearest-even rounding, preserving multiplication's NaN sign and payload.

Instances For

    Squaring and multiplying equal operands produce identical complete encodings.

    Squaring refines the exact dyadic product and the descriptor's exceptional-value policy.