Fix description of the R6RS `finite?' in manual
authorMark H Weaver <mhw@netris.org>
Tue, 1 Mar 2011 17:37:01 +0000 (12:37 -0500)
committerMark H Weaver <mhw@netris.org>
Tue, 8 Mar 2011 22:50:57 +0000 (17:50 -0500)
* doc/ref/r6rs.texi (rnrs base): `(finite? x)' returns true iff x is
  neither infinite nor a NaN.  Previously, it stated that `finite?' was
  the negation of `infinite?', which was incorrect because NaNs are
  neither finite nor infinite.  Combine description of 'nan?' with those
  of `finite?' and `infinite?'.

doc/ref/r6rs.texi

index c1ac541..8f89286 100644 (file)
@@ -356,7 +356,6 @@ grouped below by the existing manual sections to which they correspond.
 
 @deffn {Scheme Procedure} real? x
 @deffnx {Scheme Procedure} rational? x
-@deffnx {Scheme Procedure} nan? x
 @deffnx {Scheme Procedure} numerator x
 @deffnx {Scheme Procedure} denominator x
 @deffnx {Scheme Procedure} rationalize x eps
@@ -542,11 +541,15 @@ loss of numerical precision.
 imaginary parts are zero.
 @end deffn
 
-@deffn {Scheme Procedure} finite? x 
+@deffn {Scheme Procedure} nan? x
 @deffnx {Scheme Procedure} infinite? x
-@code{infinite?} returns @code{#t} if @var{x} is an infinite value,
-@code{#f} otherwise.  @code{finite?} returns the negation of 
-@code{infinite?}.
+@deffnx {Scheme Procedure} finite? x
+@code{nan?} returns @code{#t} if @var{x} is a NaN value, @code{#f}
+otherwise.  @code{infinite?} returns @code{#t} if @var{x} is an infinite
+value, @code{#f} otherwise.  @code{finite?} returns @code{#t} if @var{x}
+is neither infinite nor a NaN value, otherwise it returns @code{#f}.
+Every real number satisfies exactly one of these predicates.  An
+exception is raised if @var{x} is not real.
 @end deffn
 
 @deffn {Scheme Syntax} assert expr