Instances
Computes m * 2^e
.
Equations
- Float.ofBinaryScientific m e = let s := Nat.log2 m - 63; let m := Nat.toUInt64 (m >>> s); let e := e + Int.ofNat s; Float.scaleB (UInt64.toFloat m) e
@[defaultInstance 1001]
Equations
- instOfScientificFloat = { ofScientific := Float.ofScientific }
@[export lean_float_of_nat]
Equations
Equations
- Float.ofInt _fun_discr = match _fun_discr with | Int.ofNat n => Float.ofNat n | Int.negSucc n => Float.neg (Float.ofNat (Nat.succ n))
Equations
- instOfNatFloat = { ofNat := Float.ofNat n }