nerdamer/core
Expressions, equations, numeric values, conversion helpers, errors, and other core building blocks.
nerdamer/core. For functions used inside nerdamer('...'), see Nerdamer Notation.Functions
buildFunction(x: ExpressionInput, argsArray?: string[]): (...args: number[]): numberFunctionTypeDoc entry point for Nerdamer's supported 2.0 package surface. This file mirrors the intentional package subpaths without becoming a runtime package entry point itself.
symbols(...args: string[]): Record<string, Expression>FunctionTypeDoc entry point for Nerdamer's supported 2.0 package surface. This file mirrors the intentional package subpaths without becoming a runtime package entry point itself.
Classes
AssignmentError: unknownClassThrown when code attempts to assign to a reserved or otherwise non-assignable parser name.
CoeffObject: unknownClassStores coefficients indexed by the power or multidegree collected from an expression.
Converter: unknownClassFormats Nerdamer values as TeX or normalized text and imports supported TeX input.
DimensionError: unknownClassThrown when vector, matrix, or structured-entity dimensions are incompatible.
DivisionByZeroError: unknownClassThrown for exact division by zero. Small nonzero numerical values are not treated as zero.
Equation: unknownClassRepresents a symbolic equality between two expression sides.
Expression: unknownClassRepresents a symbolic expression in Nerdamer's canonical expression tree.
MathError: unknownClassGeneral mathematical precondition error for cases without a more specific error type.
MissingReferenceError: unknownClassThrown when a named converter or pattern reference cannot be resolved.
NaNError: unknownClassThrown when a required numeric conversion produces `NaN`.
NotImplementedError: unknownClassUsed for recognized operations that have not been implemented yet.
OperatorError: unknownClassUsed for invalid parser-operator definitions and operator dispatch failures.
ParserError: unknownClassGeneral parser error for construction, evaluation, and registered-function failures.
ParserSyntaxError: unknownClassParser syntax error kept separate from lower-level tokenization failures.
PolynomialError: unknownClassThrown when input cannot be represented as a polynomial under the requested contract.
Rational: unknownClassRepresents an exact rational value as a `bigint` numerator and denominator.
UndefinedError: unknownClassUsed when a mathematical operation has no defined value in the handled domain.
UnexpectedDataType: unknownClassThrown when an operation receives a Nerdamer entity of the wrong runtime type.
UnexpectedInputError: unknownClassUsed when input parses successfully but does not have the form an operation requires.
UnexpectedTokenError: unknownClassThrown when tokenization encounters invalid adjacency, punctuation, or bracket structure.
UnsupportedOperationError: unknownClassThrown when an operation is known but unsupported for the supplied form or domain.
ZeroToZeroPowerError: unknownClassThrown for the indeterminate symbolic form `0^0`.
Interface
APIs
ExpressionInput: number | string | Rational | Expression | bigint | DecimalAPIValues accepted by Nerdamer's expression-oriented parsing APIs.
JsFunction(...args: number[]): number | booleanAPINative JavaScript function produced or consumed by numerical compilation APIs. Arguments and numeric results use JavaScript `number` arithmetic rather than Nerdamer's exact rational or arbitrary-precision symbolic representation. Boolean results support compiled comparison expressions.
NerdamerInput: ExpressionInput | Vector | ValuesSet | Collection | Matrix | Dictionary | EquationAPIValues accepted across Nerdamer's root API and direct object model. This extends ExpressionInput with the structured parser entities and equations that can be passed back into supported operations. Individual functions may accept a narrower subset and should document that restriction locally.
OptionValue: string | boolean | number | string[] | OptionsObjectAPIValues currently accepted by Nerdamer's broad settings objects.
ParserConstants: Record<string, (): string | string>APIConstant definitions accepted by the parser's constant registry. String definitions are parsed when the constant is encountered. Function definitions are deferred factories that return parser text, allowing constants such as `pi` and `e` to reflect the active numerical precision. The registry itself is process-wide; this type does not imply isolated parser state.
ParserEntity: Expression | Vector | ValuesSet | Collection | Matrix | Equation | DictionaryAPIValues that can be produced by Nerdamer's parser.
ParserValuesObject: Record<string, NerdamerInput>APINamed values substituted while parsing or evaluating an input expression. Keys are parser variable names. This compatibility type accepts the same broad value union as the root API, but not every substitution path can consume every structured entity. The receiving operation's documentation defines the narrower contract when one applies.
StructuredEntityType: Matrix | Vector | Collection | DictionaryAPIStructured parser entities that participate in aggregate operations. The union describes Nerdamer's supported matrix, vector, ordered collection, and keyed dictionary containers. It deliberately excludes value sets and equations, whose semantics are not ordinary elementwise structured operations.
