Skip to content

Releases: Muqsit/arithmexp

v1.0.1

12 Jul 18:17
Compare
Choose a tag to compare
  • Fix spaceship operator (<=>) cannot be stringified (73fe866)

v1.0.0

12 Jul 06:09
Compare
Choose a tag to compare
  • Expressions may now return a boolean value. Consequently, constants may be assigned a boolean value, functions may accept and return a boolean value, and variables may be mapped to a boolean value.
  • Implemented comparison operators (> >= < <= <=> == != === !==) (#9) (427e2f4)
  • Implemented logical operators (! && || and or xor) (#9) (77f988c)
  • Implemented boolean functions (is_bool is_float is_finite is_infinite is_nan boolval intval floatval) (fdcb6ce)

v0.1.30

02 Jun 16:21
Compare
Choose a tag to compare

v0.1.29

15 Nov 11:53
Compare
Choose a tag to compare
  • Fixed unary positive operation resulting in negation since v0.1.28 (80ceccf)
  • Further optimized expression evaluation (6d0c799)
  • Implemented modulo operator strength reduction for identity property ((a % n) % n => a % n) (bca7b17, 9853547)
  • Removed functions rand() and getrandmax() (these functions exist in PHP only for backward compatibility) (ce8dfb3)
  • mt_rand() now accepts zero parameters (in addition to accepting two parameters) (8194bf3, f73be61)
  • Implemented mode constants for round() (HALF_UP, HALF_DOWN, HALF_EVEN, HALF_ODD) (c21ce74, 90c0f5d)
  • Renamed FunctionRegistry::register() to FunctionRegistry::registerFunction() (ad07641)
  • Renamed ConstantRegistry::register() to ConstantRegistry::registerLabel() (1b0d2d5)
  • Moved FunctionRegistry::registerMacro() to MacroRegistry::registerFunction() (0d0889f)
  • Implemented object-like macros that can be registered by calling MacroRegistry::registerObject() (34e5ad7)

v0.1.28

12 Nov 09:51
Compare
Choose a tag to compare

v0.1.27

06 Nov 05:28
Compare
Choose a tag to compare
  • Implemented function-like macros (see the wiki) (b1fc5c3)

v0.1.26

04 Nov 04:45
Compare
Choose a tag to compare
  • Introduced Parser::getOperatorManager() (4ff725f)
    • Replaced Parser::getBinaryOperatorRegistry() with Parser::getOperatorManager()->getBinaryRegistry()
    • Replaced Parser::getUnaryOperatorRegistry() with Parser::getOperatorManager()->getUnaryRegistry()
  • Fixed a few cases where optimizers did not account for INF and NAN (#16) (1ef49eb, db1df91, 03440ab, b9dd31e, 3c9b8a0, 14442ca, 082ccf3)
  • Fixed operator precedence of unary operators being greater than exponentiation (#17) (4ff725f)
  • Fixed division by zero with zero 0 / 0 returning int(0) with optimizations (1672970)
  • Function properties (commutativity and determinism) are governed by function flags instead of boolean properties (3e34845)
    • See newer examples on the wiki on registering custom binary operators, unary operators, and functions
  • Implemented idempotent functions (bd08609)

v0.1.25

23 Oct 14:26
Compare
Choose a tag to compare
  • Fixed a bug that allowed using square brackets and curly brackets to enclose function call argument list (aa71629)
  • Errored subexpressions are no longer highlighted if the subexpression is the expression itself (65290a6)
  • Improved performance of operator strength reduction by precomputing numeric literals within operands (32cf8f4)

v0.1.24

20 Oct 05:15
Compare
Choose a tag to compare
  • Added support for various forms of brackets (square brackets [] and curly brackets {} are now considered as valid in expressions) (#13, thanks @NhanAZ!)

v0.1.23

18 Oct 02:20
Compare
Choose a tag to compare
  • Registered functions for a parser can now be accessed via FunctionRegistry::register() (d003841)
  • Improved operator strength reduction performance over addition with negative operands (2bf277e, ff81320)
  • Improved operator strength reduction performance over subtraction with negative operands (da21685, ff81320)
  • Fixed a critical bug where operator strength reduction over subtraction with lvalue=0 resulted in rvalue instead of -rvalue (#11, 4f4aaea, 029e470) (thanks @sylvrs!)