emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lispref/numbers.texi


From: Luc Teirlinck
Subject: [Emacs-diffs] Changes to emacs/lispref/numbers.texi
Date: Wed, 12 Nov 2003 16:31:16 -0500

Index: emacs/lispref/numbers.texi
diff -c emacs/lispref/numbers.texi:1.29 emacs/lispref/numbers.texi:1.30
*** emacs/lispref/numbers.texi:1.29     Sun Nov  2 01:29:58 2003
--- emacs/lispref/numbers.texi  Wed Nov 12 16:30:14 2003
***************
*** 168,175 ****
  @cindex negative infinity
  @cindex infinity
  @cindex NaN
!    Most modern computers support the @acronym{IEEE} floating point standard, 
which
! provides for positive infinity and negative infinity as floating point
  values.  It also provides for a class of values called NaN or
  ``not-a-number''; numerical functions return such values in cases where
  there is no correct answer.  For example, @code{(sqrt -1.0)} returns a
--- 168,175 ----
  @cindex negative infinity
  @cindex infinity
  @cindex NaN
!   Most modern computers support the @acronym{IEEE} floating point standard,
! which provides for positive infinity and negative infinity as floating point
  values.  It also provides for a class of values called NaN or
  ``not-a-number''; numerical functions return such values in cases where
  there is no correct answer.  For example, @code{(sqrt -1.0)} returns a
***************
*** 189,196 ****
  @end table
  
    In addition, the value @code{-0.0} is distinguishable from ordinary
! zero in @acronym{IEEE} floating point (although @code{equal} and @code{=} 
consider
! them equal values).
  
    You can use @code{logb} to extract the binary exponent of a floating
  point number (or estimate the logarithm of an integer):
--- 189,196 ----
  @end table
  
    In addition, the value @code{-0.0} is distinguishable from ordinary
! zero in @acronym{IEEE} floating point (although @code{equal} and
! @code{=} consider them equal values).
  
    You can use @code{logb} to extract the binary exponent of a floating
  point number (or estimate the logarithm of an integer):
***************
*** 379,388 ****
  @end defun
  
  There are four functions to convert floating point numbers to integers;
! they differ in how they round.  These functions accept integer arguments
! also, and return such arguments unchanged.
  
! @defun truncate number
  This returns @var{number}, converted to an integer by rounding towards
  zero.
  
--- 379,394 ----
  @end defun
  
  There are four functions to convert floating point numbers to integers;
! they differ in how they round.  All accept an argument @var{number}
! and an optional argument @var{divisor}.  Both arguments may be
! integers or floating point numbers.  @var{divisor} may also be
! @code{nil}.  If @var{divisor} is @code{nil} or omitted, these
! functions convert @var{number} to an integer, or return it unchanged
! if it already is an integer.  If @var{divisor} is address@hidden, they
! divide @var{number} by @var{divisor} and convert the result to an
! integer.  An @code{arith-error} results if @var{divisor} is 0.
  
! @defun truncate number &optional divisor
  This returns @var{number}, converted to an integer by rounding towards
  zero.
  
***************
*** 402,411 ****
  This returns @var{number}, converted to an integer by rounding downward
  (towards negative infinity).
  
! If @var{divisor} is specified, @code{floor} divides @var{number} by
! @var{divisor} and then converts to an integer; this uses the kind of
! division operation that corresponds to @code{mod}, rounding downward.
! An @code{arith-error} results if @var{divisor} is 0.
  
  @example
  (floor 1.2)
--- 408,415 ----
  This returns @var{number}, converted to an integer by rounding downward
  (towards negative infinity).
  
! If @var{divisor} is specified, this uses the kind of division
! operation that corresponds to @code{mod}, rounding downward.
  
  @example
  (floor 1.2)
***************
*** 421,427 ****
  @end example
  @end defun
  
! @defun ceiling number
  This returns @var{number}, converted to an integer by rounding upward
  (towards positive infinity).
  
--- 425,431 ----
  @end example
  @end defun
  
! @defun ceiling number &optional divisor
  This returns @var{number}, converted to an integer by rounding upward
  (towards positive infinity).
  
***************
*** 437,443 ****
  @end example
  @end defun
  
! @defun round number
  This returns @var{number}, converted to an integer by rounding towards the
  nearest integer.  Rounding a value equidistant between two integers
  may choose the integer closer to zero, or it may prefer an even integer,
--- 441,447 ----
  @end example
  @end defun
  
! @defun round number &optional divisor
  This returns @var{number}, converted to an integer by rounding towards the
  nearest integer.  Rounding a value equidistant between two integers
  may choose the integer closer to zero, or it may prefer an even integer,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]