/[emacs]/emacs/lispref/numbers.texi
ViewVC logotype

Diff of /emacs/lispref/numbers.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.28 by teirllm, Tue Oct 21 01:56:45 2003 UTC revision 1.29 by eliz, Sun Nov 2 06:29:58 2003 UTC
# Line 163  example, @samp{1500.0}, @samp{15e2}, @sa Line 163  example, @samp{1500.0}, @samp{15e2}, @sa
163  value is 1500.  They are all equivalent.  You can also use a minus sign  value is 1500.  They are all equivalent.  You can also use a minus sign
164  to write negative floating point numbers, as in @samp{-1.0}.  to write negative floating point numbers, as in @samp{-1.0}.
165    
166  @cindex IEEE floating point  @cindex @acronym{IEEE} floating point
167  @cindex positive infinity  @cindex positive infinity
168  @cindex negative infinity  @cindex negative infinity
169  @cindex infinity  @cindex infinity
170  @cindex NaN  @cindex NaN
171     Most modern computers support the IEEE floating point standard, which     Most modern computers support the @acronym{IEEE} floating point standard, which
172  provides for positive infinity and negative infinity as floating point  provides for positive infinity and negative infinity as floating point
173  values.  It also provides for a class of values called NaN or  values.  It also provides for a class of values called NaN or
174  ``not-a-number''; numerical functions return such values in cases where  ``not-a-number''; numerical functions return such values in cases where
# Line 189  these special floating point values: Line 189  these special floating point values:
189  @end table  @end table
190    
191    In addition, the value @code{-0.0} is distinguishable from ordinary    In addition, the value @code{-0.0} is distinguishable from ordinary
192  zero in IEEE floating point (although @code{equal} and @code{=} consider  zero in @acronym{IEEE} floating point (although @code{equal} and @code{=} consider
193  them equal values).  them equal values).
194    
195    You can use @code{logb} to extract the binary exponent of a floating    You can use @code{logb} to extract the binary exponent of a floating
# Line 565  machines round in the standard fashion. Line 565  machines round in the standard fashion.
565  @cindex @code{arith-error} in division  @cindex @code{arith-error} in division
566  If you divide an integer by 0, an @code{arith-error} error is signaled.  If you divide an integer by 0, an @code{arith-error} error is signaled.
567  (@xref{Errors}.)  Floating point division by zero returns either  (@xref{Errors}.)  Floating point division by zero returns either
568  infinity or a NaN if your machine supports IEEE floating point;  infinity or a NaN if your machine supports @acronym{IEEE} floating point;
569  otherwise, it signals an @code{arith-error} error.  otherwise, it signals an @code{arith-error} error.
570    
571  @example  @example
# Line 1166  repeatability is helpful for debugging. Line 1166  repeatability is helpful for debugging.
1166    
1167  If you want random numbers that don't always come out the same, execute  If you want random numbers that don't always come out the same, execute
1168  @code{(random t)}.  This chooses a new seed based on the current time of  @code{(random t)}.  This chooses a new seed based on the current time of
1169  day and on Emacs's process @sc{id} number.  day and on Emacs's process @acronym{ID} number.
1170    
1171  @defun random &optional limit  @defun random &optional limit
1172  This function returns a pseudo-random integer.  Repeated calls return a  This function returns a pseudo-random integer.  Repeated calls return a
# Line 1176  If @var{limit} is a positive integer, th Line 1176  If @var{limit} is a positive integer, th
1176  nonnegative and less than @var{limit}.  nonnegative and less than @var{limit}.
1177    
1178  If @var{limit} is @code{t}, it means to choose a new seed based on the  If @var{limit} is @code{t}, it means to choose a new seed based on the
1179  current time of day and on Emacs's process @sc{id} number.  current time of day and on Emacs's process @acronym{ID} number.
1180  @c "Emacs'" is incorrect usage!  @c "Emacs'" is incorrect usage!
1181    
1182  On some machines, any integer representable in Lisp may be the result  On some machines, any integer representable in Lisp may be the result

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26