@holgerengels/compute-engine
Version:
Symbolic computing and numeric evaluations for JavaScript and Node.js
13 lines (12 loc) • 589 B
TypeScript
/* 0.26.0-alpha2 */
import type { BoxedExpression } from '../public';
/**
* Canonical form of 'Divide' (and 'Rational')
* - remove denominator of 1
* - simplify the signs
* - factor out negate (make the numerator and denominator positive)
* - if numerator and denominator are integer literals, return a rational number
* or Rational expression
* - evaluate number literals
*/
export declare function canonicalDivide(op1: BoxedExpression, op2: BoxedExpression): BoxedExpression;
export declare function div(num: BoxedExpression, denom: number | BoxedExpression): BoxedExpression;