TorchLean API

FloatLib.Numerics.Exact.Dyadic.Real

Real values of exact dyadics #

A dyadic denotes its signed integer significand times an integral power of two. Its rational and real interpretations agree, so exact arithmetic identities can be transported by casting. These definitions do not depend on any floating-point format.

noncomputable def FloatLib.Numerics.Dyadic.toReal (d : Dyadic) :

Interpret an exact dyadic (-1)^sign * significand * 2^exponent as a real.

Instances For
    @[simp]

    The exact rational and real interpretations of a dyadic agree.

    @[simp]

    Casting the signed significand separates its sign from its natural magnitude.

    @[simp]
    theorem FloatLib.Numerics.Dyadic.toReal_mk_false (significand : ) (exponent : ) :
    { negative := false, significand := significand, exponent := exponent }.toReal = significand * 2 ^ exponent

    A nonnegative dyadic constructor has the expected unsigned real denotation.