diff options
author | Fred Drake <fdrake@acm.org> | 1999-02-18 03:49:20 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1999-02-18 03:49:20 (GMT) |
commit | 951eea4733816fad445b25d8272b326dc6a8f6f0 (patch) | |
tree | 9fc5da780da410caacd62e4877d51ca9ad60c6db /Doc/lib/libfuncs.tex | |
parent | 594b3d66bd9e8c64ab5ca2810bed8699ff36ad7d (diff) | |
download | cpython-951eea4733816fad445b25d8272b326dc6a8f6f0.zip cpython-951eea4733816fad445b25d8272b326dc6a8f6f0.tar.gz cpython-951eea4733816fad445b25d8272b326dc6a8f6f0.tar.bz2 |
atof() description: Add information about accepting 'NaN' to produce
the NaN value.
Diffstat (limited to 'Doc/lib/libfuncs.tex')
-rw-r--r-- | Doc/lib/libfuncs.tex | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Doc/lib/libfuncs.tex b/Doc/lib/libfuncs.tex index 3f24101..316b294 100644 --- a/Doc/lib/libfuncs.tex +++ b/Doc/lib/libfuncs.tex @@ -231,12 +231,13 @@ removed. \begin{funcdesc}{float}{x} Convert a string or a number to floating point. If the argument is a string, it must contain a possibly signed decimal or floating point - number, possibly embedded in whitespace; - this behaves identical to \code{string.atof(\var{x})}. - Otherwise, the argument may be a plain or - long integer or a floating point number, and a floating point number - with the same value (within Python's floating point precision) is - returned. + number, possibly embedded in whitespace, or be \code{'NaN'} (case + insensitive); this behaves identical to + \code{string.atof(\var{x})}. If the string is \code{'NaN'}, the + IEEE ``Not a Number'' value is returned. Otherwise, the argument + may be a plain or long integer or a floating point number, and a + floating point number with the same value (within Python's floating + point precision) is returned. \end{funcdesc} \begin{funcdesc}{getattr}{object, name} |