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

Function nonNegativeSign

src/compute-engine/boxed-expression/sgn.ts:64–78  ·  view source on GitHub ↗
(s: Sign | undefined)

Source from the content-addressed store, hash-verified

62
63/**
64 * Sign `s` is >= 0.
65 *
66 *
67 * **note**: returns *undefined* where sign does not apply to the field of reals, or does not convey
68 * enough information.
69 *
70 * @param s
71 */
72export function nonNegativeSign(s: Sign | undefined): boolean | undefined {
73 if (s === undefined) return undefined;
74
75 if (
76 (
77 ['positive', 'positive-infinity', 'non-negative', 'zero'] as Sign[]
78 ).includes(s)
79 )
80 return true;
81 if (s === 'negative') return false;

Callers 3

isNonNegativeMethod · 0.90
isNonNegativeMethod · 0.90
isNonNegativeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected