Skip to content

MathExpressionParser v1.0.2

Compare
Choose a tag to compare
@FourteenBrush FourteenBrush released this 26 Jun 16:12
· 108 commits to master since this release

✅ Features released:

  • Bitwise operators and (&), or (|) (together with their logical variants), left shift (<<), right shift (>>), xor (^, unary) and not (~, unary). Note that these will throw when non-integer values are used. More advanced bitwise comparisons like xnor can be done with their respective function.
  • Logical operators <, >, <=, >=, !=, ==, &&, || and ! (unary) which return 1 or 0 for respectively true or false.

⚠️ Breaking changes:

  • The ^ character was previously used to raise a value to a certain power, it is now used as a bitwise or (xor), this to keep the bitwise operators consistent. For power functionality, use the new pow(x, y) function.
  • The pi() and e() functions are removed and replaced by constants pi and e. Example usage: 3 * e. Any subsequent uses of those functions will now throw a SyntaxException with message cannot solve an empty expression because e() will be interpreted as e * ().

Planned changes:

  • Syntax to dynamically insert variables.
  • Support more numeric bases.