+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new clz32(1));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(clz32.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(clz32.name, "clz32");
+ });
+ });
+});
+
+describe("cos", () => {
+ it("[[Call]] returns the cos", () => {
+ assertStrictEquals(cos(1), Math.cos(1));
+ assertStrictEquals(cos(0), 1);
+ });
+
+ it("[[Call]] throws with big·ints", () => {
+ assertThrows(() => cos(1n));
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new cos(1));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(cos.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(cos.name, "cos");
+ });
+ });
+});
+
+describe("cosh", () => {
+ it("[[Call]] returns the cosh", () => {
+ assertStrictEquals(cosh(1), Math.cosh(1));
+ assertStrictEquals(cosh(0), 1);
+ });
+
+ it("[[Call]] throws with big·ints", () => {
+ assertThrows(() => cosh(1n));
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new cosh(1));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(cosh.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(cosh.name, "cosh");
+ });
+ });
+});
+
+describe("exp", () => {
+ it("[[Call]] returns the exp", () => {
+ assertStrictEquals(exp(1), Math.E);
+ assertStrictEquals(exp(0), 1);
+ });
+
+ it("[[Call]] throws with big·ints", () => {
+ assertThrows(() => exp(1n));
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new exp(1));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(exp.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(exp.name, "exp");
+ });
+ });
+});
+
+describe("expm1", () => {
+ it("[[Call]] returns the expm1", () => {
+ assertStrictEquals(expm1(1), Math.E - 1);
+ assertStrictEquals(expm1(0), 0);
+ });
+
+ it("[[Call]] throws with big·ints", () => {
+ assertThrows(() => expm1(1n));
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new expm1(1));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(expm1.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(expm1.name, "expm1");
+ });
+ });
+});
+
+describe("floor", () => {
+ it("[[Call]] returns the floor", () => {
+ assertStrictEquals(floor(1), 1);
+ assertStrictEquals(floor(0.1), 0);
+ });
+
+ it("[[Call]] throws with big·ints", () => {
+ assertThrows(() => floor(1n));
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new floor(1));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(floor.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(floor.name, "floor");
+ });
+ });
+});
+
+describe("hypot", () => {
+ it("[[Call]] returns the floor", () => {
+ assertStrictEquals(hypot(1, 0), 1);
+ assertStrictEquals(hypot(3, 4), 5);
+ });
+
+ it("[[Call]] throws with big·ints", () => {
+ assertThrows(() => hypot(1n, 0n));
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new hypot(1, 0));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(hypot.length, 2);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(hypot.name, "hypot");
+ });
+ });
+});
+
+describe("isFiniteNumber", () => {
+ it("[[Call]] returns true for finite numbers", () => {
+ assertStrictEquals(isFiniteNumber(1), true);
+ assertStrictEquals(isFiniteNumber(Number.MAX_VALUE), true);
+ assertStrictEquals(isFiniteNumber(Number.EPSILON), true);
+ });
+
+ it("[[Call]] returns false for nonfinite numbers", () => {
+ assertStrictEquals(isFiniteNumber(NaN), false);
+ assertStrictEquals(isFiniteNumber(Infinity), false);
+ });
+
+ it("[[Call]] returns false for nonnumbers", () => {
+ assertStrictEquals(isFiniteNumber(1n), false);
+ assertStrictEquals(isFiniteNumber("1"), false);
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new isFiniteNumber(1));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(isFiniteNumber.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(isFiniteNumber.name, "isFiniteNumber");
+ });
+ });
+});
+
+describe("isIntegralNumber", () => {
+ it("[[Call]] returns true for integral numbers", () => {
+ assertStrictEquals(isIntegralNumber(1), true);
+ assertStrictEquals(isIntegralNumber(Number.MAX_VALUE), true);
+ });
+
+ it("[[Call]] returns false for nonfinite numbers", () => {
+ assertStrictEquals(isIntegralNumber(NaN), false);
+ assertStrictEquals(isIntegralNumber(Infinity), false);
+ });
+
+ it("[[Call]] returns false for nonintegral numbers", () => {
+ assertStrictEquals(isIntegralNumber(.1), false);
+ assertStrictEquals(isIntegralNumber(Number.EPSILON), false);
+ });
+
+ it("[[Call]] returns false for nonnumbers", () => {
+ assertStrictEquals(isIntegralNumber(1n), false);
+ assertStrictEquals(isIntegralNumber("1"), false);
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new isIntegralNumber(1));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(isIntegralNumber.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(isIntegralNumber.name, "isIntegralNumber");
+ });
+ });
+});
+
+describe("isNan", () => {
+ it("[[Call]] returns true for nan", () => {
+ assertStrictEquals(isNan(NaN), true);
+ });
+
+ it("[[Call]] returns false for infinite numbers", () => {
+ assertStrictEquals(isNan(-Infinity), false);
+ assertStrictEquals(isNan(Infinity), false);
+ });
+
+ it("[[Call]] returns false for finite numbers", () => {
+ assertStrictEquals(isNan(1), false);
+ assertStrictEquals(isNan(Number.MAX_VALUE), false);
+ assertStrictEquals(isNan(.1), false);
+ assertStrictEquals(isNan(Number.EPSILON), false);
+ });
+
+ it("[[Call]] returns false for nonnumbers", () => {
+ assertStrictEquals(isNan(1n), false);
+ assertStrictEquals(isNan("NaN"), false);
+ assertStrictEquals(isNan({}), false);
+ assertStrictEquals(isNan(new Date(NaN)), false);
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new isNan(1));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(isNan.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(isNan.name, "isNan");
+ });
+ });
+});
+
+describe("isSafeIntegralNumber", () => {
+ it("[[Call]] returns true for safe integral numbers", () => {
+ assertStrictEquals(isSafeIntegralNumber(1), true);
+ assertStrictEquals(
+ isSafeIntegralNumber(Number.MAX_SAFE_INTEGER),
+ true,
+ );
+ });
+
+ it("[[Call]] returns false for nonfinite numbers", () => {
+ assertStrictEquals(isSafeIntegralNumber(NaN), false);
+ assertStrictEquals(isSafeIntegralNumber(Infinity), false);
+ });
+
+ it("[[Call]] returns false for nonintegral numbers", () => {
+ assertStrictEquals(isSafeIntegralNumber(.1), false);
+ assertStrictEquals(isSafeIntegralNumber(Number.EPSILON), false);
+ });
+ it("[[Call]] returns true for unsafe integral numbers", () => {
+ assertStrictEquals(isSafeIntegralNumber(Number.MAX_VALUE), false);
+ });
+
+ it("[[Call]] returns false for nonnumbers", () => {
+ assertStrictEquals(isSafeIntegralNumber(1n), false);
+ assertStrictEquals(isSafeIntegralNumber("1"), false);
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new isSafeIntegralNumber(1));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(isSafeIntegralNumber.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(
+ isSafeIntegralNumber.name,
+ "isSafeIntegralNumber",
+ );
+ });
+ });
+});
+
+describe("ln", () => {
+ it("[[Call]] returns the ln", () => {
+ assertStrictEquals(ln(1), 0);
+ assertStrictEquals(ln(Math.E), 1);
+ });
+
+ it("[[Call]] throws with big·ints", () => {
+ assertThrows(() => ln(1n));
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new ln(1));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(ln.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(ln.name, "ln");
+ });
+ });
+});
+
+describe("ln1p", () => {
+ it("[[Call]] returns the ln1p", () => {
+ assertStrictEquals(ln1p(1), Math.log1p(1));
+ assertStrictEquals(ln1p(Math.E - 1), 1);
+ });
+
+ it("[[Call]] throws with big·ints", () => {
+ assertThrows(() => ln1p(1n));
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new ln1p(1));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(ln1p.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(ln1p.name, "ln1p");
+ });
+ });
+});
+
+describe("log10", () => {
+ it("[[Call]] returns the log10", () => {
+ assertStrictEquals(log10(1), 0);
+ assertStrictEquals(log10(10), 1);
+ });
+
+ it("[[Call]] throws with big·ints", () => {
+ assertThrows(() => log10(1n));
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new log10(1));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(log10.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(log10.name, "log10");
+ });
+ });
+});
+
+describe("log2", () => {
+ it("[[Call]] returns the log2", () => {
+ assertStrictEquals(log2(1), 0);
+ assertStrictEquals(log2(2), 1);
+ });
+
+ it("[[Call]] throws with big·ints", () => {
+ assertThrows(() => log2(1n));
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new log2(1));
+ });
+
+ describe(".length", () => {
+ it("[[Get]] returns the correct length", () => {
+ assertStrictEquals(log2.length, 1);
+ });
+ });
+
+ describe(".name", () => {
+ it("[[Get]] returns the correct name", () => {
+ assertStrictEquals(log2.name, "log2");
+ });
+ });