- float : Type
- val : self.float
- lt : self.float → self.float → Prop
- le : self.float → self.float → Prop
- decLt : DecidableRel self.lt
- decLe : DecidableRel self.le
Instances For
Raw transmutation from UInt64.
Floats and UInts have the same endianness on all supported platforms. IEEE 754 very precisely specifies the bit layout of floats.
Raw transmutation to UInt64.
Floats and UInts have the same endianness on all supported platforms. IEEE 754 very precisely specifies the bit layout of floats.
Note that this function is distinct from Float.toUInt64, which attempts
to preserve the numeric value, and not the bitwise value.
If the given float is non-negative, truncates the value to the nearest non-negative integer.
If negative or NaN, returns 0.
If larger than the maximum value for UInt8 (including Inf), returns the maximum value of UInt8
(i.e. UInt8.size - 1).
If the given float is non-negative, truncates the value to the nearest non-negative integer.
If negative or NaN, returns 0.
If larger than the maximum value for UInt16 (including Inf), returns the maximum value of UInt16
(i.e. UInt16.size - 1).
If the given float is non-negative, truncates the value to the nearest non-negative integer.
If negative or NaN, returns 0.
If larger than the maximum value for UInt32 (including Inf), returns the maximum value of UInt32
(i.e. UInt32.size - 1).
If the given float is non-negative, truncates the value to the nearest non-negative integer.
If negative or NaN, returns 0.
If larger than the maximum value for UInt64 (including Inf), returns the maximum value of UInt64
(i.e. UInt64.size - 1).
If the given float is non-negative, truncates the value to the nearest non-negative integer.
If negative or NaN, returns 0.
If larger than the maximum value for USize (including Inf), returns the maximum value of USize
(i.e. USize.size - 1). This value is platform dependent).
Equations
- instToStringFloat = { toString := Float.toString }
Equations
- instInhabitedFloat = { default := UInt64.toFloat 0 }
Equations
- instReprFloat = { reprPrec := fun (n : Float) (prec : Nat) => if n < UInt64.toFloat 0 then Repr.addAppParen (Std.Format.text (toString n)) prec else Std.Format.text (toString n) }
Equations
- instHomogeneousPowFloat = { pow := Float.pow }
Efficiently computes x * 2^i.