TorchLean API

NN.Widgets.Numerics.Float32

Float32 #

Float32 viewer widget (executable IEEE-754 backend).

Commands:

These widgets are meant for debugging/teaching, not for proof scripts.

Main definitions #

Compact rendering of a 32-bit word for the bit-pattern pills.

Instances For

    The 64-bit counterpart, used when a widget shows a binary64 input alongside its float32 result.

    Instances For

      Render exactly width low-order bits of n as a binary string.

      Instances For

        One labelled, colour-coded run of bits: the sign, exponent and fraction fields each get one.

        Colours are given as rgba overlays rather than solid fills so the widget stays readable against both light and dark editor themes.

        Instances For

          Render a dyadic rational as ±mantissa * 2^exponent.

          This is the exact value of a finite float, written the way Flocq and Coq's Fappli_IEEE write it, so what the widget shows can be compared directly against the proofs.

          Instances For

            Show how a Lean Float (binary64) rounds to an executable float32 (ExecFloat.Binary 8 23, binary32).

            Instances For

              Commands #