import { MathNode } from "mathjs"; export declare class NodeMixedNumberImpl { /** * Returns true if `node` is a mixed number * e.g. 2 1/2, 19 2/3 * Right now mathjs cannot parse the above examples; * instead it expects the input to look like e.g. 2(1)/(2), * which is division with implicit multiplication in the numerator * TODO: Add better support for mixed numbers in the future * */ isMixedNumber(node: MathNode): boolean; /** * Returns true if the mixed number is negative, * in which case we have to ignore the negative while converting to an * improper fraction, and instead we negate the whole thing at the end * e.g. -1 2/3 !== ((-1 * 3) + 2)/3 = -1/3 * -1 2/3 == -((1 * 3) + 2)/3 = -5/2 * */ isNegativeMixedNumber: (node: MathNode) => boolean; /** * Get the whole number part of a mixed number * e.g. 1 2/3 -> 1 * Negatives are ignored; e.g. -1 2/3 -> 1 * */ getWholeNumberValue: (node: MathNode) => number; /** * Get the numerator part of a mixed number * e.g. 1 2/3 -> 2 * */ getNumeratorValue: (node: MathNode) => number; /** * Get the denominator part of a mixed number * e.g. 1 2/3 -> 3 * */ getDenominatorValue: (node: MathNode) => number; } export declare const NodeMixedNumber: NodeMixedNumberImpl;