mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-07 06:50:23 -08:00
Document Lisp floats a bit better
* doc/lispref/numbers.texi (Float Basics): * doc/misc/cl.texi (Implementation Parameters): * lisp/emacs-lisp/cl-lib.el (cl-most-positive-float) (cl-least-positive-float) (cl-least-positive-normalized-float, cl-float-epsilon) (cl-float-negative-epsilon): Document IEEE floating point better. Don’t suggest that Emacs might use some floating-point format other than IEEE format, as Emacs currently assumes IEEE in several places and there seems little point in removing those assumptions.
This commit is contained in:
parent
6ad5eb9794
commit
b6942c0c37
3 changed files with 37 additions and 41 deletions
|
|
@ -299,7 +299,7 @@ If true return the decimal value of digit CHAR in RADIX."
|
|||
(defconst cl-most-positive-float nil
|
||||
"The largest value that a Lisp float can hold.
|
||||
If your system supports infinities, this is the largest finite value.
|
||||
For IEEE machines, this is approximately 1.79e+308.
|
||||
For Emacs, this equals 1.7976931348623157e+308.
|
||||
Call `cl-float-limits' to set this.")
|
||||
|
||||
(defconst cl-most-negative-float nil
|
||||
|
|
@ -309,8 +309,8 @@ Call `cl-float-limits' to set this.")
|
|||
|
||||
(defconst cl-least-positive-float nil
|
||||
"The smallest value greater than zero that a Lisp float can hold.
|
||||
For IEEE machines, it is about 4.94e-324 if denormals are supported,
|
||||
or 2.22e-308 if they are not.
|
||||
For Emacs, this equals 5e-324 if subnormal numbers are supported,
|
||||
`cl-least-positive-normalized-float' if they are not.
|
||||
Call `cl-float-limits' to set this.")
|
||||
|
||||
(defconst cl-least-negative-float nil
|
||||
|
|
@ -320,10 +320,8 @@ Call `cl-float-limits' to set this.")
|
|||
|
||||
(defconst cl-least-positive-normalized-float nil
|
||||
"The smallest normalized Lisp float greater than zero.
|
||||
This is the smallest value for which IEEE denormalization does not lose
|
||||
precision. For IEEE machines, this value is about 2.22e-308.
|
||||
For machines that do not support the concept of denormalization
|
||||
and gradual underflow, this constant equals `cl-least-positive-float'.
|
||||
This is the smallest value that has full precision.
|
||||
For Emacs, this equals 2.2250738585072014e-308.
|
||||
Call `cl-float-limits' to set this.")
|
||||
|
||||
(defconst cl-least-negative-normalized-float nil
|
||||
|
|
@ -334,12 +332,12 @@ Call `cl-float-limits' to set this.")
|
|||
(defconst cl-float-epsilon nil
|
||||
"The smallest positive float that adds to 1.0 to give a distinct value.
|
||||
Adding a number less than this to 1.0 returns 1.0 due to roundoff.
|
||||
For IEEE machines, epsilon is about 2.22e-16.
|
||||
For Emacs, this equals 2.220446049250313e-16.
|
||||
Call `cl-float-limits' to set this.")
|
||||
|
||||
(defconst cl-float-negative-epsilon nil
|
||||
"The smallest positive float that subtracts from 1.0 to give a distinct value.
|
||||
For IEEE machines, it is about 1.11e-16.
|
||||
For Emacs, this equals 1.1102230246251565e-16.
|
||||
Call `cl-float-limits' to set this.")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue