Skip to content

Commit f1432ae

Browse files
committed
test
1 parent ac8d469 commit f1432ae

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/runtime/object.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1486,9 +1486,9 @@ extern "C" LEAN_EXPORT double lean_float_scaleb(double a, b_lean_obj_arg b) {
14861486
}
14871487
}
14881488

1489-
extern "C" LEAN_EXPORT uint8_t lean_float_isnan(double a) { return isnan(a); }
1490-
extern "C" LEAN_EXPORT uint8_t lean_float_isfinite(double a) { return isfinite(a); }
1491-
extern "C" LEAN_EXPORT uint8_t lean_float_isinf(double a) { return isinf(a); }
1489+
extern "C" LEAN_EXPORT uint8_t lean_float_isnan(double a) { return (bool) isnan(a); }
1490+
extern "C" LEAN_EXPORT uint8_t lean_float_isfinite(double a) { return (bool) isfinite(a); }
1491+
extern "C" LEAN_EXPORT uint8_t lean_float_isinf(double a) { return (bool) isinf(a); }
14921492
extern "C" LEAN_EXPORT obj_res lean_float_frexp(double a) {
14931493
object* r = lean_alloc_ctor(0, 2, 0);
14941494
int exp;

tests/compiler/float.lean

-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ def tst1 : IO Unit := do
1919
IO.println (0 / 0 : Float).toUInt16
2020
IO.println (0 / 0 : Float).toUInt32
2121
IO.println (0 / 0 : Float).toUInt64
22-
IO.println (0 / 0 : Float).isNaN
23-
IO.println (0 / 0 : Float).isInf
24-
IO.println (0 / 0 : Float).isFinite
25-
IO.println (0 / 0 : Float).frExp
2622
IO.println (-1 : Float).toUInt8
2723
IO.println (256 : Float).toUInt8
2824
IO.println (1 / 0 : Float).toUInt8

0 commit comments

Comments
 (0)