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

Function orderPool

test/compute-engine/nightly/comparison-matrix.test.ts:138–155  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

136
137// ── Pool for the order() total-order matrix (b5-order.ts). ──
138function orderPool(): any[] {
139 return [
140 ce.number(1), ce.number(-2), ce.number(0.5), ce.number(3.7),
141 ce.number(NaN), ce.number(Infinity), ce.number(-Infinity),
142 ce.expr(['Rational', 1, 3]), ce.expr(['Rational', -7, 2]),
143 ce.expr(['Sqrt', 2]).evaluate(), ce.expr(['Sqrt', 5]).evaluate(),
144 ce.expr(['Complex', 1, 1]), ce.expr(['Complex', 0, 1]), ce.expr(['Complex', 2, -3]),
145 ce.symbol('ImaginaryUnit'), ce.symbol('Pi'), ce.symbol('ExponentialE'),
146 ce.symbol('x'), ce.symbol('y'), ce.symbol('zz'),
147 ce.parse('x^2'), ce.parse('x^3'), ce.parse('y^2'),
148 ce.parse('x y'), ce.parse('2 x'), ce.parse('x+y'), ce.parse('x+1'),
149 ce.parse('\\sin(x)'), ce.parse('\\cos(x)'), ce.parse('\\sin(y)'),
150 ce.parse('\\ln(x)'), ce.parse('f(x)'),
151 ce.parse('\\frac{x}{y}'), ce.parse('\\frac{1}{x}'),
152 ce.string('abc'), ce.string('abd'), ce.symbol('True'),
153 ce.expr(['List', 1, 2]), ce.parse('x^2+x'), ce.parse('x^2+y^2'),
154 ];
155}
156const sgn = (n: number) => (n < 0 ? -1 : n > 0 ? 1 : n === 0 ? 0 : NaN);
157
158describeNightly('NIGHTLY comparison — order() is a total order', () => {

Callers 1

Calls 6

numberMethod · 0.65
exprMethod · 0.65
evaluateMethod · 0.65
symbolMethod · 0.65
parseMethod · 0.65
stringMethod · 0.65

Tested by

no test coverage detected