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

Function negativeSign

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

Source from the content-addressed store, hash-verified

89 * Sign `s` is < 0.
90 *
91 * :::info[Note]
92 * Returns `undefined` for cases where the given sign is either non-applicable to real numbers
93 * ('nan', 'unsigned', 'complex-infinity') or does not convey enough information (e.g. 'real',
94 * 'not-zero', 'real-not-zero', 'non-positive').
95 * :::
96 *
97 * @param s
98 */
99export function negativeSign(s: Sign | undefined): boolean | undefined {
100 if (s === undefined) return undefined;
101
102 if (s === 'negative') return true;
103 if ((['non-negative', 'zero', 'positive'] as Sign[]).includes(s))

Callers 3

isNegativeMethod · 0.90
isNegativeMethod · 0.90
isNegativeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected