emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r116806: * numbers.texi: Improve and clarify a bit,


From: Paul Eggert
Subject: [Emacs-diffs] trunk r116806: * numbers.texi: Improve and clarify a bit, and fix some minor bugs.
Date: Wed, 19 Mar 2014 21:21:05 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116806
revision-id: address@hidden
parent: address@hidden
author: Paul Eggert  <address@hidden>
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Wed 2014-03-19 14:21:01 -0700
message:
  * numbers.texi: Improve and clarify a bit, and fix some minor bugs.
  
  Remove now-obsolete hypothetical note about negative division,
  as the C standard has changed.
modified:
  doc/lispref/ChangeLog          changelog-20091113204419-o5vbwnq5f7feedwu-6155
  doc/lispref/numbers.texi       
numbers.texi-20091113204419-o5vbwnq5f7feedwu-6203
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2014-03-19 21:09:08 +0000
+++ b/doc/lispref/ChangeLog     2014-03-19 21:21:01 +0000
@@ -1,5 +1,9 @@
 2014-03-19  Paul Eggert  <address@hidden>
 
+       * numbers.texi: Improve and clarify a bit, and fix some minor bugs.
+       Remove now-obsolete hypothetical note about negative division,
+       as the C standard has changed.
+
        Fix porting inconsistency about rounding to even.
        * numbers.texi (Numeric Conversions, Rounding Operations):
        Document that 'round' and 'fround' round to even.

=== modified file 'doc/lispref/numbers.texi'
--- a/doc/lispref/numbers.texi  2014-03-19 21:09:08 +0000
+++ b/doc/lispref/numbers.texi  2014-03-19 21:21:01 +0000
@@ -116,8 +116,8 @@
 @minus{}1 is represented as 30 ones.  (This is called @dfn{two's
 complement} notation.)
 
-  The negative integer, @minus{}5, is creating by subtracting 4 from
address@hidden  In binary, the decimal integer 4 is 100.  Consequently,
+  Subtracting 4 from @minus{}1 returns the negative integer @minus{}5.
+In binary, the decimal integer 4 is 100.  Consequently,
 @minus{}5 looks like this:
 
 @example
@@ -190,8 +190,8 @@
 @end defvar
 
   In Emacs Lisp, text characters are represented by integers.  Any
-integer between zero and the value of @code{max-char}, inclusive, is
-considered to be valid as a character.  @xref{String Basics}.
+integer between zero and the value of @code{(max-char)}, inclusive, is
+considered to be valid as a character.  @xref{Character Codes}.
 
 @node Float Basics
 @section Floating-Point Basics
@@ -252,7 +252,7 @@
 where @var{s} and @var{e} are respectively the significand and
 exponent of the floating-point number @var{x}.
 
-If @var{x} is finite, @var{s} is a floating-point number between 0.5
+If @var{x} is finite, then @var{s} is a floating-point number between 0.5
 (inclusive) and 1.0 (exclusive), @var{e} is an integer, and
 @ifnottex
 @var{x} = @var{s} * address@hidden
@@ -260,9 +260,9 @@
 @tex
 @math{x = s 2^e}.
 @end tex
-If @var{x} is zero or infinity, @var{s} is the same as @var{x}.
-If @var{x} is a NaN, @var{s} is also a NaN.
-If @var{x} is zero, @var{e} is 0.
+If @var{x} is zero or infinity, then @var{s} is the same as @var{x}.
+If @var{x} is a NaN, then @var{s} is also a NaN.
+If @var{x} is zero, then @var{e} is 0.
 @end defun
 
 @defun ldexp sig &optional exp
@@ -275,9 +275,9 @@
 and returns the result.  @var{x1} and @var{x2} must be floating point.
 @end defun
 
address@hidden logb number
-This function returns the binary exponent of @var{number}.  More
-precisely, the value is the logarithm of |@var{number}| base 2, rounded
address@hidden logb x
+This function returns the binary exponent of @var{x}.  More
+precisely, the value is the logarithm base 2 of @math{|x|}, rounded
 down to an integer.
 
 @example
@@ -367,7 +367,7 @@
 @example
 (defvar fuzz-factor 1.0e-6)
 (defun approx-equal (x y)
-  (or (and (= x 0) (= y 0))
+  (or (= x y)
       (< (/ (abs (- x y))
             (max (abs x) (abs y)))
          fuzz-factor)))
@@ -648,10 +648,6 @@
 
 If all the arguments are integers, the result is an integer, obtained
 by rounding the quotient towards zero after each division.
-(Hypothetically, some machines may have different rounding behavior
-for negative arguments, because @code{/} is implemented using the C
-division operator, which permits machine-dependent rounding; but this
-does not happen in practice.)
 
 @example
 @group
@@ -706,8 +702,7 @@
 @end example
 
 @noindent
-always equals @var{dividend}.  If @var{divisor} is zero, Emacs signals
-an @code{arith-error} error.
+always equals @var{dividend} if @var{divisor} is nonzero.
 
 @example
 (% 9 4)
@@ -769,7 +764,8 @@
 
 @noindent
 always equals @var{dividend}, subject to rounding error if either
-argument is floating point.  For @code{floor}, see @ref{Numeric
+argument is floating point and to an @code{arith-error} if @var{dividend} is an
+integer and @var{divisor} is 0.  For @code{floor}, see @ref{Numeric
 Conversions}.
 @end defun
 
@@ -1194,8 +1190,8 @@
 @end defun
 
 @defun sqrt arg
-This returns the square root of @var{arg}.  If @var{arg} is negative,
address@hidden returns a NaN.
+This returns the square root of @var{arg}.  If @var{arg} is finite
+and less than zero, @code{sqrt} returns a NaN.
 @end defun
 
 In addition, Emacs defines the following common mathematical
@@ -1244,8 +1240,8 @@
 @code{most-negative-fixnum} and @code{most-positive-fixnum}
 (@pxref{Integer Basics}).
 
-If @var{limit} is @code{t}, it means to choose a new seed based on the
-current time of day and on Emacs's process @acronym{ID} number.
+If @var{limit} is @code{t}, it means to choose a new seed as if Emacs
+were restarting.
 
 If @var{limit} is a string, it means to choose a new seed based on the
 string's contents.


reply via email to

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