equivalent

Returns whether two expressions take the same value everywhere both are defined, or undefined when too few sampled points were defined on both sides to say.

@internote/canvas-sdkFunction
On this page
import { equivalent } from '@internote/canvas-sdk';

Decided by sampling, not algebra: both expressions are evaluated at a fixed spread of points over every letter either uses. That accepts x*x for x^2 and every reordering and factorisation, and cannot see the difference between 2(x + 1) and 2x + 2, which is what a question's form: is for.

#Signature

(a: MathsNode, b: MathsNode): boolean | undefined

#Parameters

a
One expression's tree, as parseMathsValue produces it.
b
The other's.

Declared in packages/canvas-sdk/src/assess/judge.ts:129.

Last updated