// Generated by ReScript, PLEASE EDIT WITH CARE

import * as Mocha from "mocha";
import * as Pervasives from "@rescript/runtime/lib/es6/Pervasives.mjs";
import * as Test_utils from "./test_utils.mjs";

Mocha.describe("Js_float_test", () => {
  Mocha.test("_NaN <> _NaN", () => Test_utils.eq("File \"js_float_test.res\", line 6, characters 32-39", false, NaN === NaN));
  Mocha.test("isNaN - _NaN", () => Test_utils.eq("File \"js_float_test.res\", line 7, characters 32-39", true, Number.isNaN(NaN)));
  Mocha.test("isNaN - 0.", () => Test_utils.eq("File \"js_float_test.res\", line 8, characters 30-37", false, Number.isNaN(0)));
  Mocha.test("isFinite - infinity", () => Test_utils.eq("File \"js_float_test.res\", line 9, characters 39-46", false, Number.isFinite(Pervasives.infinity)));
  Mocha.test("isFinite - neg_infinity", () => Test_utils.eq("File \"js_float_test.res\", line 10, characters 43-50", false, Number.isFinite(Pervasives.neg_infinity)));
  Mocha.test("isFinite - _NaN", () => Test_utils.eq("File \"js_float_test.res\", line 11, characters 35-42", false, Number.isFinite(NaN)));
  Mocha.test("isFinite - 0.", () => Test_utils.eq("File \"js_float_test.res\", line 12, characters 33-40", true, Number.isFinite(0)));
  Mocha.test("toExponential", () => Test_utils.eq("File \"js_float_test.res\", line 13, characters 33-40", "1.23456e+2", (123.456).toExponential()));
  Mocha.test("toExponential - large number", () => Test_utils.eq("File \"js_float_test.res\", line 14, characters 48-55", "1.2e+21", (1.2e21).toExponential()));
  Mocha.test("toExponentialWithPrecision - digits:2", () => Test_utils.eq("File \"js_float_test.res\", line 16, characters 7-14", "1.23e+2", (123.456).toExponential(2)));
  Mocha.test("toExponentialWithPrecision - digits:4", () => Test_utils.eq("File \"js_float_test.res\", line 19, characters 7-14", "1.2346e+2", (123.456).toExponential(4)));
  Mocha.test("toExponentialWithPrecision - digits:20", () => Test_utils.eq("File \"js_float_test.res\", line 22, characters 7-14", "0.00000000000000000000e+0", (0).toExponential(20)));
  Mocha.test("toExponentialWithPrecision - digits:101", () => Test_utils.throws("File \"js_float_test.res\", line 25, characters 11-18", () => (0).toExponential(101)));
  Mocha.test("toExponentialWithPrecision - digits:-1", () => Test_utils.throws("File \"js_float_test.res\", line 28, characters 11-18", () => (0).toExponential(-1)));
  Mocha.test("toFixed", () => Test_utils.eq("File \"js_float_test.res\", line 30, characters 27-34", "123", (123.456).toFixed()));
  Mocha.test("toFixed - large number", () => Test_utils.eq("File \"js_float_test.res\", line 31, characters 42-49", "1.2e+21", (1.2e21).toFixed()));
  Mocha.test("toFixedWithPrecision - digits:2", () => Test_utils.eq("File \"js_float_test.res\", line 33, characters 7-14", "123.46", (123.456).toFixed(2)));
  Mocha.test("toFixedWithPrecision - digits:4", () => Test_utils.eq("File \"js_float_test.res\", line 36, characters 7-14", "123.4560", (123.456).toFixed(4)));
  Mocha.test("toFixedWithPrecision - digits:20", () => Test_utils.eq("File \"js_float_test.res\", line 39, characters 7-14", "0.00000000000000000000", (0).toFixed(20)));
  Mocha.test("toFixedWithPrecision - digits:101", () => Test_utils.throws("File \"js_float_test.res\", line 42, characters 11-18", () => (0).toFixed(101)));
  Mocha.test("toFixedWithPrecision - digits:-1", () => Test_utils.throws("File \"js_float_test.res\", line 45, characters 11-18", () => (0).toFixed(-1)));
  Mocha.test("toPrecision", () => Test_utils.eq("File \"js_float_test.res\", line 47, characters 31-38", "123.456", (123.456).toPrecision()));
  Mocha.test("toPrecision - large number", () => Test_utils.eq("File \"js_float_test.res\", line 48, characters 46-53", "1.2e+21", (1.2e21).toPrecision()));
  Mocha.test("toPrecisionWithPrecision - digits:2", () => Test_utils.eq("File \"js_float_test.res\", line 50, characters 7-14", "1.2e+2", (123.456).toPrecision(2)));
  Mocha.test("toPrecisionWithPrecision - digits:4", () => Test_utils.eq("File \"js_float_test.res\", line 53, characters 7-14", "123.5", (123.456).toPrecision(4)));
  Mocha.test("toPrecisionWithPrecision - digits:20", () => Test_utils.eq("File \"js_float_test.res\", line 56, characters 7-14", "0.0000000000000000000", (0).toPrecision(20)));
  Mocha.test("toPrecisionWithPrecision - digits:101", () => Test_utils.throws("File \"js_float_test.res\", line 59, characters 11-18", () => (0).toPrecision(101)));
  Mocha.test("toPrecisionWithPrecision - digits:-1", () => Test_utils.throws("File \"js_float_test.res\", line 62, characters 11-18", () => (0).toPrecision(-1)));
  Mocha.test("toString", () => Test_utils.eq("File \"js_float_test.res\", line 64, characters 28-35", "1.23", (1.23).toString()));
  Mocha.test("toString - large number", () => Test_utils.eq("File \"js_float_test.res\", line 65, characters 43-50", "1.2e+21", (1.2e21).toString()));
  Mocha.test("toStringWithRadix - radix:2", () => Test_utils.eq("File \"js_float_test.res\", line 68, characters 6-13", "1111011.0111010010111100011010100111111011111001110111", (123.456).toString(2)));
  Mocha.test("toStringWithRadix - radix:16", () => Test_utils.eq("File \"js_float_test.res\", line 74, characters 7-14", "7b.74bc6a7ef9dc", (123.456).toString(16)));
  Mocha.test("toStringWithRadix - radix:36", () => Test_utils.eq("File \"js_float_test.res\", line 76, characters 48-55", "3f", (123).toString(36)));
  Mocha.test("toStringWithRadix - radix:37", () => Test_utils.throws("File \"js_float_test.res\", line 78, characters 11-18", () => (0).toString(37)));
  Mocha.test("toStringWithRadix - radix:1", () => Test_utils.throws("File \"js_float_test.res\", line 81, characters 11-18", () => (0).toString(1)));
  Mocha.test("toStringWithRadix - radix:-1", () => Test_utils.throws("File \"js_float_test.res\", line 84, characters 11-18", () => (0).toString(-1)));
  Mocha.test("fromString - 123", () => Test_utils.eq("File \"js_float_test.res\", line 86, characters 36-43", 123, Number("123")));
  Mocha.test("fromString - 12.3", () => Test_utils.eq("File \"js_float_test.res\", line 87, characters 37-44", 12.3, Number("12.3")));
  Mocha.test("fromString - empty string", () => Test_utils.eq("File \"js_float_test.res\", line 88, characters 45-52", 0, Number("")));
  Mocha.test("fromString - 0x11", () => Test_utils.eq("File \"js_float_test.res\", line 89, characters 37-44", 17, Number("0x11")));
  Mocha.test("fromString - 0b11", () => Test_utils.eq("File \"js_float_test.res\", line 90, characters 37-44", 3, Number("0b11")));
  Mocha.test("fromString - 0o11", () => Test_utils.eq("File \"js_float_test.res\", line 91, characters 37-44", 9, Number("0o11")));
  Mocha.test("fromString - invalid string", () => Test_utils.eq("File \"js_float_test.res\", line 92, characters 47-54", true, Number.isNaN(Number("foo"))));
});

/*  Not a pure module */
