2020-07-04 10:09:48 -07:00
|
|
|
test("basic functionality", () => {
|
2020-07-06 07:37:45 -07:00
|
|
|
expect(Math.atanh).toHaveLength(1);
|
2020-06-21 11:34:00 +02:00
|
|
|
|
2020-07-06 07:37:45 -07:00
|
|
|
expect(Math.atanh(-2)).toBeNaN();
|
|
|
|
|
expect(Math.atanh(2)).toBeNaN();
|
|
|
|
|
expect(Math.atanh(-1)).toBe(-Infinity);
|
2020-12-29 13:44:52 +03:00
|
|
|
expect(Math.atanh(0)).toBe(0);
|
2020-07-06 07:37:45 -07:00
|
|
|
expect(Math.atanh(0.5)).toBeCloseTo(0.549306);
|
2020-12-29 13:44:52 +03:00
|
|
|
expect(Math.atanh(1)).toBe(Infinity);
|
2022-11-28 12:02:45 +01:00
|
|
|
expect(Math.atanh(NaN)).toBe(NaN);
|
|
|
|
|
expect(Math.atanh(-0.0)).toBe(-0.0);
|
2020-07-04 10:09:48 -07:00
|
|
|
});
|