diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-23 01:24:49 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-23 01:24:49 +0000 |
| commit | 0111978da7b1643d92fb70461cb44ab9723896c7 (patch) | |
| tree | cef7da32e3c41a4e99bb4d1e1a11eab2c341c509 /doc/language/function/cpsc-function-is_num.7.md | |
| parent | a0dba2acdeb6e2e9af8e53a4d886fba79c7a3afe (diff) | |
fix(stdlib): reject NaN, infinity and hexadecimal text in IS_NUM, STR_TO_NUM and INPUT
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'doc/language/function/cpsc-function-is_num.7.md')
| -rw-r--r-- | doc/language/function/cpsc-function-is_num.7.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/language/function/cpsc-function-is_num.7.md b/doc/language/function/cpsc-function-is_num.7.md index 3b9641d..8b07b02 100644 --- a/doc/language/function/cpsc-function-is_num.7.md +++ b/doc/language/function/cpsc-function-is_num.7.md @@ -14,7 +14,7 @@ IS_NUM(text : STRING) RETURNS BOOLEAN Provided by the standard string library, loaded and linked by default. -Return true exactly when STR_TO_NUM would succeed: a nonempty string fully consumed by `strtod`, with a value inside the REAL range. Leading whitespace, NaN, inf and hexadecimal forms are accepted; trailing whitespace, trailing text, embedded NUL bytes and overflowing values such as `1e999` are rejected. Underflow to zero or a denormal is accepted. +Return true exactly when STR_TO_NUM would succeed: a nonempty string fully consumed by `strtod`, with a value inside the REAL range. After any leading whitespace, only the characters `0123456789.eE+-` may appear, so NaN, inf/infinity and hexadecimal forms are rejected. Leading whitespace, exponents (`1e3`), a leading `+`, `.5` and `5.` are accepted; trailing whitespace, trailing text, embedded NUL bytes and overflowing values such as `1e999` are rejected. Underflow to zero or a denormal is accepted. # EXAMPLE |
