eval_ex
1.2.0, released 2 years ago by an unverified publisher
Mathematical and boolean expression evaluator supporting arbitrary precision.
What it does
Evaluates mathematical and boolean expressions passed as strings, utilizing the decimal package for arbitrary precision arithmetic. It supports variables, custom functions, operators, and various built-in math and logic operations.
AI-written summary of version 1.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to evaluate mathematical expressions parsed from strings or user input
- You require arbitrary precision arithmetic for calculations
- You want to support custom variables, operators, and functions inside mathematical expressions
Skip it when
- You are dealing with high-performance real-time physics engines requiring specialized math pipelines
- You need built-in support for hyperbolic functions
Strengths
- Supports arbitrary precision arithmetic using decimal
- Extensive list of built-in math and logic functions and operators
- Easy to add custom functions, operators, and variables
Weaknesses
- Hyperbolic functions are not supported
- The SQRT function is limited to 64-bit precision
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Expression exp = Expression("2 ^ 4 + 8");
print(exp.eval().toString());Alternatives
Packages that do the same job and could replace eval_ex.
- unorm_dart
Unicode normalization for Dart supporting NFC, NFD, NFKC, and NFKD forms.
87Compare - exif_reader
Decode EXIF metadata from various image formats in Dart, Web, and Flutter.
73Compare - dart_earcut
Performant ear-clipping polygon triangulation algorithm
51Compare - boolean_selector
Parses and evaluates simplified Dart-like boolean expression strings.
50Compare
Works with
Packages commonly used together with eval_ex: ones it builds on, ones built on it, and its own family.