Documentation

Batteries.Data.Float.Basic

The floating point value closest to the mathematical constant π.

Equations
Instances For

    Returns v, exp integers such that f = v * 2^exp. (e is not minimal, but v.abs will be at most 2^53 - 1.) Returns none when f is not finite (i.e. inf, -inf or a nan).

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Returns v, exp integers such that f = v * 2^exp. Like toRatParts, but e is guaranteed to be minimal (v is always odd), unless v = 0. v.abs will be at most 2^53 - 1 because Float has 53 bits of precision. Returns none when f is not finite (i.e. inf, -inf or a nan).

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        Calculates the number of trailing bits in a UInt64. Requires v ≠ 0.

        Converts f to a string, including all decimal digits.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          The floating point value closest to the mathematical constant π.

          Equations
          Instances For

            Returns v, exp integers such that f = v * 2^exp. (e is not minimal, but v.abs will be at most 2^24 - 1.) Returns none when f is not finite (i.e. inf, -inf or a nan).

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Returns v, exp integers such that f = v * 2^exp. Like toRatParts, but e is guaranteed to be minimal (v is always odd), unless v = 0. v.abs will be at most 2^24 - 1 because Float32 has 24 bits of precision. Returns none when f is not finite (i.e. inf, -inf or a nan).

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                Calculates the number of trailing bits in a UInt32. Requires v ≠ 0.

                Converts f to a string, including all decimal digits.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  def Nat.divFloat (a b : Nat) :

                  Divide two natural numbers, to produce a correctly rounded (nearest-ties-to-even) Float result.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    def Int.divFloat (a b : Int) :

                    Divide two integers, to produce a correctly rounded (nearest-ties-to-even) Float result.

                    Equations
                    Instances For