Expand description
Mathematical expression evaluation for zshrs
Direct port from zsh/Src/math.c
Supports:
- Integer and floating point arithmetic
- All C operators (+, -, *, /, %, <<, >>, &, |, ^, etc.)
- Zsh ** power operator
- Comparison operators (<, >, <=, >=, ==, !=)
- Logical operators (&&, ||, !)
- Ternary operator (? :)
- Assignment operators (=, +=, -=, *=, /=, etc.)
- Pre/post increment/decrement (++, –)
- Base conversion (
16#FF,2#1010,[16]FF) - Special values (Inf, NaN)
- Variable references and assignment
Structs§
- Math
Eval - Math evaluator state
Enums§
- MathNum
- Math number - can be integer or float