Releases: Muqsit/arithmexp
Releases · Muqsit/arithmexp
v1.0.1
v1.0.0
- 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
v0.1.29
- 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()
andgetrandmax()
(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()
toFunctionRegistry::registerFunction()
(ad07641) - Renamed
ConstantRegistry::register()
toConstantRegistry::registerLabel()
(1b0d2d5) - Moved
FunctionRegistry::registerMacro()
toMacroRegistry::registerFunction()
(0d0889f) - Implemented object-like macros that can be registered by calling
MacroRegistry::registerObject()
(34e5ad7)
v0.1.28
v0.1.27
v0.1.26
- Introduced
Parser::getOperatorManager()
(4ff725f)- Replaced
Parser::getBinaryOperatorRegistry()
withParser::getOperatorManager()->getBinaryRegistry()
- Replaced
Parser::getUnaryOperatorRegistry()
withParser::getOperatorManager()->getUnaryRegistry()
- Replaced
- 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
returningint(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
- 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
v0.1.23
- 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 inrvalue
instead of-rvalue
(#11, 4f4aaea, 029e470) (thanks @sylvrs!)