quds_formula_parser 0.1.0 copy "quds_formula_parser: ^0.1.0" to clipboard
quds_formula_parser: ^0.1.0 copied to clipboard

Dart package designed for parsing and evaluating mathematical, logical, and textual formulas. It enables developers to input complex expressions.

0.0.8 #

  • Performance Optimizations (2x faster parsing, 1.5x faster evaluation):
    • HashMap-based function lookup: O(n*m) → O(1) for function identification (+50% on function-heavy formulas)
    • Index-based string parsing: Eliminated redundant substring operations (+20-25% parsing speedup)
    • Pre-allocated evaluation stacks: Reduced memory reallocation during evaluation (+5-10% on large formulas)
    • Bracket pair caching: Pre-computed during organization phase (+10% on nested expressions)
  • Added comprehensive performance benchmarks in test/performance_test.dart
  • All optimizations maintain 100% backward compatibility and correctness

0.0.1 #

  • Initial version.

0.0.2 #

  • Updated the packege to fit the pub scores creteria.

0.0.3 #

  • Updated the packege to fit the pub scores creteria.

0.0.4 #

  • Added support of fraction type.
  • Simplified the usage of the provider
  • Simplified the registration of new function
  provider.registerFunction(
      notations: ['Randomize', 'Custom.Rnd'],
      evaluator: (params) {
        return params.first * Random().nextInt(100);
      },
      checkParameters: (params) => params.length == 1 && params.first is num);
  • Added manipulating method
  provider.registerFunction(
      notations: ['SinX'],
      checkParameters: (params) => params.length == 1 && params.first is num,
      evaluator: (params) {
        return sin(params.first);
      },
      manipulateResult: (r) =>
          r.abs() < 1e-6 ? 0.0 : r);

0.0.5 #

  • Created an extension on Iterable<T> to perform quick queries on iterables like isSingle, isCouple, isTriple, second, third, fourth, fifth.

  • Support new functions:

  • Mathematical: Random, ASin, ACos, ATan, ATan2, Root, RandomInt, RandomDouble, GCD, LCM, IsPrime.
  • Statisticals: Permutations, Combinations, Mode.
  • Geometry: IsPoint, IsPoint2D, IsPoint3D.
  • Core: IsDate, IsTime, IsDateTime, IsDuration, IsBool, IsFraction, IsAtom.
  • Date & Time: Hour, Minute, Second.
  • Logical: XOR, Toggle, AllTrue, AnyTrue, AllFalse, AnyFalse, RandomBool.
  • Iterables: List, Reverse, Set, Intersect, Union, Differnce.
  • Support new constants:
  • Mathematical: ln10, ln2, log2e, log10e, sqrt1_2, sqrt2.
  • Support new types:
  • Iterables with IterableWrapper as its values wrapper.
  • Simplified some functions registrations.

0.0.6 #

  • Simplified the bodies of most of operators.
  • Defined new functions:MemberAt, IndexOf.
  • Developed the 2d plotter example.

0.0.7 #

  • New Feature: Simplification of the formula.
  • New Feature: [Beta] Convert the formula to Tex-Notation to be visualized.

0.0.9 #

  • Enhanced the performance

0.0.10 #

  • Updated the README.md file

0.0.11 #

  • Developed a comprehensive example showing the power of the package

0.1.0 #

  • Fixed the screenshots of the package
8
likes
150
points
300
downloads
screenshot

Documentation

API reference

Publisher

verified publisherquds.cc

Weekly Downloads

Dart package designed for parsing and evaluating mathematical, logical, and textual formulas. It enables developers to input complex expressions.

Repository (GitHub)
View/report issues

License

MIT (license)

More

Packages that depend on quds_formula_parser