NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #1227 most downloaded on pub.dev
A library for parsing and evaluating mathematical expressions, supporting real numbers, vectors, and basic interval arithmetic.
Last release 2 months ago
29 Jul 2026
Ships fairly regularly
a new release about every 5 months
Nearly every release is documented
notes for 33 of 33 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
37 releases · first in 2013
Add support for implicit multiplication to GrammarParser.
GrammarParser.useTraditionalMathDefinitions option to RealEvaluator to return
double.nan for mathematically undefined operations (e.g. division by
zero, 0^0, tan(pi/2)) instead of following Dart's default
floating-point behavior.Update petitparser dependency to 7.x.
petitparser dependency to 7.x.One column per quarter.
Add support for listing all variables in an Expression with the VariableCollector visitor. #73
Add support for listing all variables in an Expression with the
VariableCollector visitor. #73
Add support for evaluating an Expression with the visitor interface:
RealEvaluator (as real number), IntervalEvaluator (as interval),
VectorEvalutor (as vector).
This offers a strongly typed interface and replaces Expression.evaluate():
// Old
dynamic result = expression.evaluate(EvaluationType.REAL, context);
// New
var evaluator = RealEvaluator(context);
int result = evaluator.evaluate(expression);
Rootfunction now accepts an Expression as degree.AlgorithmicFunction can no longer be
dynamically typed.Expression.evaluate() method. Use RealEvaluator instead.The old expression parser is now deprecated. It is still exposed under the type alias Parser to maintain backwards compatibility.
GrammarParser.
e, pi, ln10, ln2, log10e, log2e,
sqrt1_2 and sqrt2.ParserOptions.$, followed by any number of word characters (letter or digit).petitparser.Parser to maintain backwards compatibility.Add support for additional constants to GrammarParser: ln10, ln2, log10e, log2e, sqrt1_2 and sqrt2.
GrammarParser: ln10, ln2,
log10e, log2e, sqrt1_2 and sqrt2.ParserOptions: This enables
parsing of constant symbols that do not match the allowed variable identifier
naming schema.Add support for n-th root function to GrammarParser.
GrammarParser.This parser is now in maintenance mode and will not receive any new features. Parser remains as a deprecated type alias to this legacy implementation…
GrammarParser instead of the legacy
Parser.
The new parser fixes some long-standing issues with expression parsing, but
is still missing a few features that were previously supported by the legacy
parser:
$,
followed by any number of word characters (letter or digit). This is mostly
relevant for user-provided identifiers (algorithmic functions and variables).piand e
(Euler's constant). #26ShuntingYardParser. This parser
is now in maintenance mode and will not receive any new features.
Parser remains as a deprecated type alias to this legacy implementation to
maintain backwards compatibility.Add parser support for implicit multiplication (thanks juca1331)
Add support for parsing variables containing digits (thanks alexander-zubkov)
Add UnaryPlus operator (thanks jpnurmi)
Evaluate roots written as powers correctly for negative bases (thanks edhom)
Add factorial function (thanks Just-Learned-It)
Add algorithmic function that is bound to a Dart handler function, including parser support (thanks kamimark)
Fix inaccuracies in sin/cos/tan when using math.pi (machine pi) (thanks mbullington)
- Bumped to stable release.
Drop support for Dart SDK versions below 2.12.0
Lower precedence of unary minus below power operator to match common mathematics conventions so that -x^y is parsed as -(x^y) instead of (-x)^y
-x^y is parsed as -(x^y) instead of (-x)^yAdd ability to unbind variable names (by wdavies973)
ceil function (by pepsin)Drop support for Dart SDK versions below 2.1.1
unnecessary_new lint ruleFormatException instead of StateError or ArgumentError for
invalid input stringlog_b(x) to log(b, x)nrt_n(x) to nrt(n, x)exp(x) to e(x)Package health and maintenance cleanups
Drop support for Dart SDK versions below 2.0.0
Drop support for Dart SDK versions below 1.24.0
vector_math 2.0.0 or newerLast release to only support Dart 1.x
Point3 now is a subtype of Vector3
Point3D to Point3Point3 now is a subtype of Vector3deriveDepend on vector_math 1.4.4 or greater
vector_math 1.4.4 or greaterAdd support for basic vector operations
test instead of unittest packagevector_math as latest pub release is severely outdatedAdd absolute value function (by markhats)
To create exponentials, use e(x) or e^x. Consequently, removed support for exp(x).
e(x) or e^x. Consequently, removed support for exp(x).Bring back standard syntax for unary minus: -5 works now. (by markhats)
Introduce nested context/naming scopes
Add compose operator for functions: Use & to conveniently create a CompositeFunction from two existing functions: expr = f & g;
& to conveniently create a CompositeFunction from two existing
functions: expr = f & g;- Minor code cleanup - Prepare for Dart 1.0
Fix handling of operator associativity
2*-5 use 2*_5.Fix bug in differentiation of Sin and Cos
Fix bug in simplification of Minus
Improve documentation and examples
Initial release of standalone version
Your coding agent can read these notes before it upgrades. Set up the MCP server →