Closed as duplicate
Description
let t1 = infinity->Belt.Float.toInt
let t2 = infinity->Float.toInt
generates
import * as PervasivesU from "./stdlib/pervasivesU.js";
var t1 = PervasivesU.infinity | 0;
var t2 = PervasivesU.infinity | 0;
both are 0
. so we don't actually have a way to compare int value with the infinity without %raw
. because infinity
in pervasive is float
Infinity
is often used in arithmetic operations as well as a value indicating "no limit" (e.g. pagination)
#6038 also mentioned