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

Function positiveSign

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

Source from the content-addressed store, hash-verified

41 * Sign `s` is > 0.
42 *
43 * :::info[Note]
44 * Returns `undefined` for cases where the given sign is either non-applicable to real numbers
45 * ('nan', 'unsigned', 'complex-infinity') or does not convey enough information (e.g. 'real',
46 * 'not-zero', 'real-not-zero', 'non-negative').
47 * :::
48 *
49 * @param s
50 */
51export function positiveSign(s: Sign | undefined): boolean | undefined {
52 if (s === undefined) return undefined;
53
54 if (s === 'positive') return true;
55 if ((['non-positive', 'zero', 'negative'] as Sign[]).includes(s))
56 return false;

Callers 3

isPositiveMethod · 0.90
isPositiveMethod · 0.90
isPositiveMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected