lean4-htt/tests/lean/run/float_from_bignum.lean
2020-09-30 07:05:46 -07:00

13 lines
351 B
Text

new_frontend
def check (b : Bool) : IO Unit :=
«unless» b $ throw $ IO.userError "check failed"
def tst1 : IO Unit := do
check (Nat.toFloat (10^40) > Nat.toFloat (10^30));
check (Nat.toFloat (10^40) >= Nat.toFloat (10^30));
check (Nat.toFloat (10^40) == Nat.toFloat (10^40));
check (Nat.toFloat (10^80) > Nat.toFloat (10^40));
pure ()
#eval tst1