[math] Check for runtime errors

When number is infinite, not a number, larger than LONG_MAX or smaller
than LONG_MIN, print a corresponding error and return STATUS_CMD_ERROR.

This should fix the worst of the problems, by at least making them clear.

Fixes #4479.
Fixes #4768.
This commit is contained in:
Fabian Homborg
2018-03-07 18:01:12 +01:00
parent 98d29b53de
commit 9fc3d1215b
2 changed files with 24 additions and 2 deletions

View File

@@ -17,7 +17,7 @@ The following options are available:
\subsection return-values Return Values
If the expression is successfully evaluated the return `status` is zero (success) else one.
If the expression is successfully evaluated and doesn't over/underflow or return NaN the return `status` is zero (success) else one.
\subsection math-syntax