9 Commits
Author SHA1 Message Date
Kyle Edwards 8cf21478ac math(): Add INCREMENT and DECREMENT modes 2026-07-15 11:40:07 -04:00
Tyler Yankee 57444e1d3f math: Avoid FPE on INT_MIN by -1 2026-04-27 09:22:26 -04:00
Brad King 099c05dd04 math: Avoid signed integer overflow when intrinsics are available
The `math(EXPR)` command documents that results must fit in a 64-bit
signed integer.  When built with compilers that offer the relevant
intrinsics, detect overflow and issue warnings.
2026-02-28 07:03:51 -05:00
Tyler Yankee 4b0c458c09 LexerParser: Disallow modulo by zero 2026-02-03 13:35:59 -05:00
Brad King 406f397e8b math: Restore toleration of unexpected characters in an expression
Prior to commit 7c4c13ffef (math: Reject unexpected expression input
explicitly, 2018-05-18) we ignored unexpected characters in an
expression that otherwise can be parsed.  In order to preserve
compatibility with projects that accidentally used this, convert the
error to a warning.
2018-07-16 14:46:43 -04:00
Daniel Franke 5dbee9d2d0 math: Add options to calculate and format output as hexadecimal 2018-07-03 09:55:58 -04:00
Daniel Franke 8661e7052c math: Diagnose divide-by-zero 2018-06-26 14:21:18 -04:00
Daniel Franke 7c4c13ffef math: Reject unexpected expression input explicitly
Switch to C++ exceptions for lexer/parser error handling.
Teach the lexer/parser to fail on unexpected input.
2018-06-26 14:15:21 -04:00
Daniel Franke 963b8d9f6c math: Add RunCMake.math test to prepare for error cases 2018-06-22 09:00:34 -04:00