MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / isMachineRational

Function isMachineRational

src/compute-engine/numerics/rationals.ts:13–17  ·  view source on GitHub ↗
(
  x: unknown | null
)

Source from the content-addressed store, hash-verified

11}
12
13export function isMachineRational(
14 x: unknown | null
15): x is [SmallInteger, SmallInteger] {
16 return x !== null && Array.isArray(x) && typeof x[0] === 'number';
17}
18
19export function isBigRational(x: unknown | null): x is [bigint, bigint] {
20 return x !== null && Array.isArray(x) && typeof x[0] === 'bigint';

Callers 9

_numericValueMethod · 0.90
serializeJsonNumberFunction · 0.90
_bignumComponentMethod · 0.90
numeratorMethod · 0.90
denominatorMethod · 0.90
sqrtMethod · 0.90
mulFunction · 0.85
rationalGcdFunction · 0.85
reducedRationalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected