exactnumber
Version:
Arbitrary-precision decimals. Enables making math calculations with rational numbers, without precision loss.
35 lines (33 loc) • 634 B
text/typescript
import * as API from '.';
describe('API', () => {
it('Export all APIs', () => {
expect(Object.keys(API)).toStrictEqual([
'ExactNumber',
'RoundingMode',
'ModType',
// 'nthroot',
// 'sqrt',
// 'cbrt',
// 'pow',
// 'exp',
// 'log',
// 'logn',
// 'log10',
// 'log2',
// 'PI',
// 'sin',
// 'cos',
// 'tan',
// 'asin',
// 'acos',
// 'atan',
// 'sinh',
// 'cosh',
// 'tanh',
// 'asinh',
// 'acosh',
// 'atanh',
]);
expect(API.ExactNumber(12).toString()).toBe('12');
});
});