Documentation

Init.Data.Float.Model.Unpacked.Operations.ToNat

def Float.Model.UnpackedFloat.roundToInt (sign : Sign) (mantissa : Nat) (exponent : Int) :

Returns an Int that is close to the given (sign, mantissa, exponent) triple. Specifically, we round to zero rather than rounding to nearest like we do everywhere else.

Instances For
    def Float.Model.UnpackedFloat.toInt (negativeInfinity positiveInfinity : Int) :

    Converts an UnpackedFloat to an Int, sending NaN to 0 and positive and negative infinity to the given values.

    Instances For

      Converts an UnpackedFloat to a UInt8, truncating after the decimal point, sending NaN to 0 and clamping out-of-range values and infinities.

      Instances For

        Converts an UnpackedFloat to a UInt16, truncating after the decimal point, sending NaN to 0 and clamping out-of-range values and infinities.

        Instances For

          Converts an UnpackedFloat to a UInt32, truncating after the decimal point, sending NaN to 0 and clamping out-of-range values and infinities.

          Instances For

            Converts an UnpackedFloat to a UInt64, truncating after the decimal point, sending NaN to 0 and clamping out-of-range values and infinities.

            Instances For

              Converts an UnpackedFloat to a USize, truncating after the decimal point, sending NaN to 0 and clamping out-of-range values and infinities.

              Instances For

                Converts an UnpackedFloat to an Int8, truncating after the decimal point, sending NaN to 0 and clamping out-of-range values and infinities.

                Instances For

                  Converts an UnpackedFloat to an Int16, truncating after the decimal point, sending NaN to 0 and clamping out-of-range values and infinities.

                  Instances For

                    Converts an UnpackedFloat to an Int32, truncating after the decimal point, sending NaN to 0 and clamping out-of-range values and infinities.

                    Instances For

                      Converts an UnpackedFloat to an Int64, truncating after the decimal point, sending NaN to 0 and clamping out-of-range values and infinities.

                      Instances For

                        Converts an UnpackedFloat to an ISize, truncating after the decimal point, sending NaN to 0 and clamping out-of-range values and infinities.

                        Instances For