diff --git a/src/Core__BigInt.mjs b/src/Core__BigInt.mjs index 88c19a2e..56b7eda6 100644 --- a/src/Core__BigInt.mjs +++ b/src/Core__BigInt.mjs @@ -5,12 +5,12 @@ function toInt(t) { return Number(t) | 0; } -function exp(x, y) { - return (x ** y); +function lnot(x) { + return x ^ -1n; } export { toInt , - exp , + lnot , } /* No side effect */ diff --git a/test/TempTests.mjs b/test/TempTests.mjs index 4239421f..47409903 100644 --- a/test/TempTests.mjs +++ b/test/TempTests.mjs @@ -4,6 +4,7 @@ import * as Core__Int from "../src/Core__Int.mjs"; import * as IntlTests from "./intl/IntlTests.mjs"; import * as Core__Dict from "../src/Core__Dict.mjs"; import * as Core__JSON from "../src/Core__JSON.mjs"; +import * as Caml_bigint from "rescript/lib/es6/caml_bigint.js"; import * as Caml_option from "rescript/lib/es6/caml_option.js"; import * as Core__Array from "../src/Core__Array.mjs"; import * as Core__Float from "../src/Core__Float.mjs"; @@ -143,7 +144,7 @@ console.info("BigInt"); console.info("---"); -console.log(BigInt(1) / BigInt(12.0)); +console.log(Caml_bigint.div(BigInt(1), BigInt(12.0))); console.info("");