Documentation

LeanPool.Flean.FloatCfg

Floating-Point Configuration #

This module defines FloatCfg, the precision and exponent-range parameters that describe a floating-point format, along with the available RoundingModes and a Rounding typeclass selecting the mode in scope.

structure FloatCfg :

A floating-point format: a precision prec and an exponent range [emin, emax].

  • prec :

    The precision: the number of representable mantissa steps.

  • emin :

    The minimum exponent of the format.

  • emax :

    The maximum exponent of the format.

  • emin_lt_emax : self.emin < self.emax

    The exponent range is nonempty.

  • prec_pos : 0 < self.prec

    The precision is positive.

Instances For
    inductive RoundingMode :

    The supported rounding modes for converting a rational to a float.

    Instances For
      class Rounding :

      A typeclass selecting the RoundingMode in scope.

      • The rounding mode used by the operations in scope.

      Instances