diff options
| author | Paul Eggert | 2014-03-17 18:19:03 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-03-17 18:19:03 -0700 |
| commit | 09b73f0820fd38194b46aa71e1652c594a25586c (patch) | |
| tree | 6de632fe9e072e0645864ca8b2c83303ea17884b /doc/lispref | |
| parent | 07f44fdbfe0060781773f04867cfe1e1a1411f83 (diff) | |
| download | emacs-09b73f0820fd38194b46aa71e1652c594a25586c.tar.gz emacs-09b73f0820fd38194b46aa71e1652c594a25586c.zip | |
Style fixes for floating-point doc.
* commands.texi, customize.texi, display.texi, elisp.texi, files.texi:
* frames.texi, hash.texi, internals.texi, keymaps.texi, lists.texi:
* minibuf.texi, nonascii.texi, numbers.texi, objects.texi, os.texi:
* processes.texi, streams.texi, strings.texi, text.texi:
* variables.texi, windows.texi:
Hyphenate "floating-point" iff it precedes a noun.
Reword to avoid nouns and hyphenation when that's easy.
Prefer "integer" to "integer number" and "is floating point"
to "is a floating point number".
Prefer "@minus{}" to "-" when it's a minus.
Diffstat (limited to 'doc/lispref')
| -rw-r--r-- | doc/lispref/ChangeLog | 14 | ||||
| -rw-r--r-- | doc/lispref/commands.texi | 10 | ||||
| -rw-r--r-- | doc/lispref/customize.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 35 | ||||
| -rw-r--r-- | doc/lispref/elisp.texi | 4 | ||||
| -rw-r--r-- | doc/lispref/files.texi | 9 | ||||
| -rw-r--r-- | doc/lispref/frames.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/hash.texi | 8 | ||||
| -rw-r--r-- | doc/lispref/internals.texi | 10 | ||||
| -rw-r--r-- | doc/lispref/keymaps.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/lists.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/minibuf.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/nonascii.texi | 12 | ||||
| -rw-r--r-- | doc/lispref/numbers.texi | 98 | ||||
| -rw-r--r-- | doc/lispref/objects.texi | 20 | ||||
| -rw-r--r-- | doc/lispref/os.texi | 31 | ||||
| -rw-r--r-- | doc/lispref/processes.texi | 4 | ||||
| -rw-r--r-- | doc/lispref/streams.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/strings.texi | 21 | ||||
| -rw-r--r-- | doc/lispref/text.texi | 4 | ||||
| -rw-r--r-- | doc/lispref/variables.texi | 12 | ||||
| -rw-r--r-- | doc/lispref/windows.texi | 4 |
22 files changed, 161 insertions, 151 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 6e89c0d489b..37531b0fb31 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,17 @@ | |||
| 1 | 2014-03-18 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Style fixes for floating-point doc. | ||
| 4 | * commands.texi, customize.texi, display.texi, elisp.texi, files.texi: | ||
| 5 | * frames.texi, hash.texi, internals.texi, keymaps.texi, lists.texi: | ||
| 6 | * minibuf.texi, nonascii.texi, numbers.texi, objects.texi, os.texi: | ||
| 7 | * processes.texi, streams.texi, strings.texi, text.texi: | ||
| 8 | * variables.texi, windows.texi: | ||
| 9 | Hyphenate "floating-point" iff it precedes a noun. | ||
| 10 | Reword to avoid nouns and hyphenation when that's easy. | ||
| 11 | Prefer "integer" to "integer number" and "is floating point" | ||
| 12 | to "is a floating point number". | ||
| 13 | Prefer "@minus{}" to "-" when it's a minus. | ||
| 14 | |||
| 1 | 2014-03-16 Martin Rudalics <rudalics@gmx.at> | 15 | 2014-03-16 Martin Rudalics <rudalics@gmx.at> |
| 2 | 16 | ||
| 3 | * display.texi (Temporary Displays): Rewrite descriptions of | 17 | * display.texi (Temporary Displays): Rewrite descriptions of |
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index e4494e7538f..5c28522158a 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi | |||
| @@ -2471,7 +2471,7 @@ displayed there. Otherwise @code{read-event} does not move the cursor. | |||
| 2471 | If @var{seconds} is non-@code{nil}, it should be a number specifying | 2471 | If @var{seconds} is non-@code{nil}, it should be a number specifying |
| 2472 | the maximum time to wait for input, in seconds. If no input arrives | 2472 | the maximum time to wait for input, in seconds. If no input arrives |
| 2473 | within that time, @code{read-event} stops waiting and returns | 2473 | within that time, @code{read-event} stops waiting and returns |
| 2474 | @code{nil}. A floating-point value for @var{seconds} means to wait | 2474 | @code{nil}. A floating point @var{seconds} means to wait |
| 2475 | for a fractional number of seconds. Some systems support only a whole | 2475 | for a fractional number of seconds. Some systems support only a whole |
| 2476 | number of seconds; on these systems, @var{seconds} is rounded down. | 2476 | number of seconds; on these systems, @var{seconds} is rounded down. |
| 2477 | If @var{seconds} is @code{nil}, @code{read-event} waits as long as | 2477 | If @var{seconds} is @code{nil}, @code{read-event} waits as long as |
| @@ -2915,8 +2915,8 @@ time to read text that you display. The value is @code{t} if | |||
| 2915 | @code{sit-for} waited the full time with no input arriving | 2915 | @code{sit-for} waited the full time with no input arriving |
| 2916 | (@pxref{Event Input Misc}). Otherwise, the value is @code{nil}. | 2916 | (@pxref{Event Input Misc}). Otherwise, the value is @code{nil}. |
| 2917 | 2917 | ||
| 2918 | The argument @var{seconds} need not be an integer. If it is a floating | 2918 | The argument @var{seconds} need not be an integer. If it is floating |
| 2919 | point number, @code{sit-for} waits for a fractional number of seconds. | 2919 | point, @code{sit-for} waits for a fractional number of seconds. |
| 2920 | Some systems support only a whole number of seconds; on these systems, | 2920 | Some systems support only a whole number of seconds; on these systems, |
| 2921 | @var{seconds} is rounded down. | 2921 | @var{seconds} is rounded down. |
| 2922 | 2922 | ||
| @@ -2942,8 +2942,8 @@ This function simply pauses for @var{seconds} seconds without updating | |||
| 2942 | the display. It pays no attention to available input. It returns | 2942 | the display. It pays no attention to available input. It returns |
| 2943 | @code{nil}. | 2943 | @code{nil}. |
| 2944 | 2944 | ||
| 2945 | The argument @var{seconds} need not be an integer. If it is a floating | 2945 | The argument @var{seconds} need not be an integer. If it is floating |
| 2946 | point number, @code{sleep-for} waits for a fractional number of seconds. | 2946 | point, @code{sleep-for} waits for a fractional number of seconds. |
| 2947 | Some systems support only a whole number of seconds; on these systems, | 2947 | Some systems support only a whole number of seconds; on these systems, |
| 2948 | @var{seconds} is rounded down. | 2948 | @var{seconds} is rounded down. |
| 2949 | 2949 | ||
diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 4b0a0a9ba2c..094beef01ec 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi | |||
| @@ -571,7 +571,7 @@ The value must be an integer. | |||
| 571 | The value must be a number (floating point or integer). | 571 | The value must be a number (floating point or integer). |
| 572 | 572 | ||
| 573 | @item float | 573 | @item float |
| 574 | The value must be a floating point number. | 574 | The value must be floating point. |
| 575 | 575 | ||
| 576 | @item string | 576 | @item string |
| 577 | The value must be a string. The customization buffer shows the string | 577 | The value must be a string. The customization buffer shows the string |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 8bd657b5a9b..0246d1a44de 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -554,8 +554,7 @@ This normal hook is run whenever the echo area is cleared---either by | |||
| 554 | 554 | ||
| 555 | @defopt echo-keystrokes | 555 | @defopt echo-keystrokes |
| 556 | This variable determines how much time should elapse before command | 556 | This variable determines how much time should elapse before command |
| 557 | characters echo. Its value must be an integer or floating point number, | 557 | characters echo. Its value must be a number, and specifies the |
| 558 | which specifies the | ||
| 559 | number of seconds to wait before echoing. If the user types a prefix | 558 | number of seconds to wait before echoing. If the user types a prefix |
| 560 | key (such as @kbd{C-x}) and then delays this many seconds before | 559 | key (such as @kbd{C-x}) and then delays this many seconds before |
| 561 | continuing, the prefix key is echoed in the echo area. (Once echoing | 560 | continuing, the prefix key is echoed in the echo area. (Once echoing |
| @@ -1508,7 +1507,7 @@ of them: | |||
| 1508 | @table @code | 1507 | @table @code |
| 1509 | @item priority | 1508 | @item priority |
| 1510 | @kindex priority @r{(overlay property)} | 1509 | @kindex priority @r{(overlay property)} |
| 1511 | This property's value (which should be a non-negative integer number) | 1510 | This property's value (which should be a non-negative integer) |
| 1512 | determines the priority of the overlay. No priority, or @code{nil}, | 1511 | determines the priority of the overlay. No priority, or @code{nil}, |
| 1513 | means zero. | 1512 | means zero. |
| 1514 | 1513 | ||
| @@ -1949,14 +1948,14 @@ parts of Emacs text. | |||
| 1949 | lines in a frame, using the @code{line-spacing} frame parameter | 1948 | lines in a frame, using the @code{line-spacing} frame parameter |
| 1950 | (@pxref{Layout Parameters}). However, if the default value of | 1949 | (@pxref{Layout Parameters}). However, if the default value of |
| 1951 | @code{line-spacing} is non-@code{nil}, it overrides the | 1950 | @code{line-spacing} is non-@code{nil}, it overrides the |
| 1952 | frame's @code{line-spacing} parameter. An integer value specifies the | 1951 | frame's @code{line-spacing} parameter. An integer specifies the |
| 1953 | number of pixels put below lines. A floating point number specifies | 1952 | number of pixels put below lines. A floating-point number specifies |
| 1954 | the spacing relative to the frame's default line height. | 1953 | the spacing relative to the frame's default line height. |
| 1955 | 1954 | ||
| 1956 | @vindex line-spacing | 1955 | @vindex line-spacing |
| 1957 | You can specify the line spacing for all lines in a buffer via the | 1956 | You can specify the line spacing for all lines in a buffer via the |
| 1958 | buffer-local @code{line-spacing} variable. An integer value specifies | 1957 | buffer-local @code{line-spacing} variable. An integer specifies |
| 1959 | the number of pixels put below lines. A floating point number | 1958 | the number of pixels put below lines. A floating-point number |
| 1960 | specifies the spacing relative to the default frame line height. This | 1959 | specifies the spacing relative to the default frame line height. This |
| 1961 | overrides line spacings specified for the frame. | 1960 | overrides line spacings specified for the frame. |
| 1962 | 1961 | ||
| @@ -2070,11 +2069,11 @@ Relative character width. This should be one of the symbols | |||
| 2070 | The height of the font. In the simplest case, this is an integer in | 2069 | The height of the font. In the simplest case, this is an integer in |
| 2071 | units of 1/10 point. | 2070 | units of 1/10 point. |
| 2072 | 2071 | ||
| 2073 | The value can also be a floating point number or a function, which | 2072 | The value can also be floating point or a function, which |
| 2074 | specifies the height relative to an @dfn{underlying face} | 2073 | specifies the height relative to an @dfn{underlying face} |
| 2075 | (@pxref{Displaying Faces}). If the value is a floating point number, | 2074 | (@pxref{Displaying Faces}). A floating-point value |
| 2076 | that specifies the amount by which to scale the height of the | 2075 | specifies the amount by which to scale the height of the |
| 2077 | underlying face. If the value is a function, that function is called | 2076 | underlying face. A function value is called |
| 2078 | with one argument, the height of the underlying face, and returns the | 2077 | with one argument, the height of the underlying face, and returns the |
| 2079 | height of the new face. If the function is passed an integer | 2078 | height of the new face. If the function is passed an integer |
| 2080 | argument, it must return an integer. | 2079 | argument, it must return an integer. |
| @@ -3320,7 +3319,7 @@ These have the same meanings as the face attributes of the same name. | |||
| 3320 | 3319 | ||
| 3321 | @item :size | 3320 | @item :size |
| 3322 | The font size---either a non-negative integer that specifies the pixel | 3321 | The font size---either a non-negative integer that specifies the pixel |
| 3323 | size, or a floating point number that specifies the point size. | 3322 | size, or a floating-point number that specifies the point size. |
| 3324 | 3323 | ||
| 3325 | @item :adstyle | 3324 | @item :adstyle |
| 3326 | Additional typographic style information for the font, such as | 3325 | Additional typographic style information for the font, such as |
| @@ -4104,7 +4103,7 @@ can use in @var{props} to specify the weight of the space: | |||
| 4104 | 4103 | ||
| 4105 | @table @code | 4104 | @table @code |
| 4106 | @item :width @var{width} | 4105 | @item :width @var{width} |
| 4107 | If @var{width} is an integer or floating point number, it specifies | 4106 | If @var{width} is a number, it specifies |
| 4108 | that the space width should be @var{width} times the normal character | 4107 | that the space width should be @var{width} times the normal character |
| 4109 | width. @var{width} can also be a @dfn{pixel width} specification | 4108 | width. @var{width} can also be a @dfn{pixel width} specification |
| 4110 | (@pxref{Pixel Specification}). | 4109 | (@pxref{Pixel Specification}). |
| @@ -4128,7 +4127,7 @@ also specify the height of the space, with these properties: | |||
| 4128 | @table @code | 4127 | @table @code |
| 4129 | @item :height @var{height} | 4128 | @item :height @var{height} |
| 4130 | Specifies the height of the space. | 4129 | Specifies the height of the space. |
| 4131 | If @var{height} is an integer or floating point number, it specifies | 4130 | If @var{height} is a number, it specifies |
| 4132 | that the space height should be @var{height} times the normal character | 4131 | that the space height should be @var{height} times the normal character |
| 4133 | height. The @var{height} may also be a @dfn{pixel height} specification | 4132 | height. The @var{height} may also be a @dfn{pixel height} specification |
| 4134 | (@pxref{Pixel Specification}). | 4133 | (@pxref{Pixel Specification}). |
| @@ -4251,7 +4250,7 @@ This specification together with @code{image} specifies a @dfn{slice} | |||
| 4251 | (a partial area) of the image to display. The elements @var{y} and | 4250 | (a partial area) of the image to display. The elements @var{y} and |
| 4252 | @var{x} specify the top left corner of the slice, within the image; | 4251 | @var{x} specify the top left corner of the slice, within the image; |
| 4253 | @var{width} and @var{height} specify the width and height of the | 4252 | @var{width} and @var{height} specify the width and height of the |
| 4254 | slice. Integer values are numbers of pixels. A floating point number | 4253 | slice. Integers are numbers of pixels. A floating-point number |
| 4255 | in the range 0.0--1.0 stands for that fraction of the width or height | 4254 | in the range 0.0--1.0 stands for that fraction of the width or height |
| 4256 | of the entire image. | 4255 | of the entire image. |
| 4257 | 4256 | ||
| @@ -5072,7 +5071,7 @@ The argument @var{slice} specifies a slice of the image to insert. If | |||
| 5072 | Otherwise, @var{slice} is a list @code{(@var{x} @var{y} @var{width} | 5071 | Otherwise, @var{slice} is a list @code{(@var{x} @var{y} @var{width} |
| 5073 | @var{height})} which specifies the @var{x} and @var{y} positions and | 5072 | @var{height})} which specifies the @var{x} and @var{y} positions and |
| 5074 | @var{width} and @var{height} of the image area to insert. Integer | 5073 | @var{width} and @var{height} of the image area to insert. Integer |
| 5075 | values are in units of pixels. A floating point number in the range | 5074 | values are in units of pixels. A floating-point number in the range |
| 5076 | 0.0--1.0 stands for that fraction of the width or height of the entire | 5075 | 0.0--1.0 stands for that fraction of the width or height of the entire |
| 5077 | image. | 5076 | image. |
| 5078 | 5077 | ||
| @@ -5143,8 +5142,8 @@ will load. Emacs will refuse to load (and display) any image that is | |||
| 5143 | larger than this limit. | 5142 | larger than this limit. |
| 5144 | 5143 | ||
| 5145 | If the value is an integer, it directly specifies the maximum | 5144 | If the value is an integer, it directly specifies the maximum |
| 5146 | image height and width, measured in pixels. If it is a floating | 5145 | image height and width, measured in pixels. If it is floating |
| 5147 | point number, it specifies the maximum image height and width | 5146 | point, it specifies the maximum image height and width |
| 5148 | as a ratio to the frame height and width. If the value is | 5147 | as a ratio to the frame height and width. If the value is |
| 5149 | non-numeric, there is no explicit limit on the size of images. | 5148 | non-numeric, there is no explicit limit on the size of images. |
| 5150 | 5149 | ||
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index c0040d748c3..567cbe0eea7 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi | |||
| @@ -296,7 +296,7 @@ Lisp Data Types | |||
| 296 | Programming Types | 296 | Programming Types |
| 297 | 297 | ||
| 298 | * Integer Type:: Numbers without fractional parts. | 298 | * Integer Type:: Numbers without fractional parts. |
| 299 | * Floating Point Type:: Numbers with fractional parts and with a large range. | 299 | * Floating-Point Type:: Numbers with fractional parts and with a large range. |
| 300 | * Character Type:: The representation of letters, numbers and | 300 | * Character Type:: The representation of letters, numbers and |
| 301 | control characters. | 301 | control characters. |
| 302 | * Symbol Type:: A multi-use object that refers to a function, | 302 | * Symbol Type:: A multi-use object that refers to a function, |
| @@ -361,7 +361,7 @@ Numbers | |||
| 361 | * Comparison of Numbers:: Equality and inequality predicates. | 361 | * Comparison of Numbers:: Equality and inequality predicates. |
| 362 | * Numeric Conversions:: Converting float to integer and vice versa. | 362 | * Numeric Conversions:: Converting float to integer and vice versa. |
| 363 | * Arithmetic Operations:: How to add, subtract, multiply and divide. | 363 | * Arithmetic Operations:: How to add, subtract, multiply and divide. |
| 364 | * Rounding Operations:: Explicitly rounding floating point numbers. | 364 | * Rounding Operations:: Explicitly rounding floating-point numbers. |
| 365 | * Bitwise Operations:: Logical and, or, not, shifting. | 365 | * Bitwise Operations:: Logical and, or, not, shifting. |
| 366 | * Math Functions:: Trig, exponential and logarithmic functions. | 366 | * Math Functions:: Trig, exponential and logarithmic functions. |
| 367 | * Random Numbers:: Obtaining random integers, predictable or not. | 367 | * Random Numbers:: Obtaining random integers, predictable or not. |
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index f6f1c7210bd..3818c18f57a 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi | |||
| @@ -1162,8 +1162,7 @@ links, can be created by using the @code{add-name-to-file} function | |||
| 1162 | 1162 | ||
| 1163 | @item | 1163 | @item |
| 1164 | The file's @acronym{UID}, normally as a string. However, if it does | 1164 | The file's @acronym{UID}, normally as a string. However, if it does |
| 1165 | not correspond to a named user, the value is an integer or a floating | 1165 | not correspond to a named user, the value is a number. |
| 1166 | point number. | ||
| 1167 | 1166 | ||
| 1168 | @item | 1167 | @item |
| 1169 | The file's @acronym{GID}, likewise. | 1168 | The file's @acronym{GID}, likewise. |
| @@ -1187,8 +1186,8 @@ its owner and group, and other information recorded in the filesystem | |||
| 1187 | for the file, beyond the file's contents. | 1186 | for the file, beyond the file's contents. |
| 1188 | 1187 | ||
| 1189 | @item | 1188 | @item |
| 1190 | The size of the file in bytes. If the size is too large to fit in a | 1189 | The size of the file in bytes. This is floating point if the size is |
| 1191 | Lisp integer, this is a floating point number. | 1190 | too large to fit in a Lisp integer. |
| 1192 | 1191 | ||
| 1193 | @item | 1192 | @item |
| 1194 | The file's modes, as a string of ten letters or dashes, | 1193 | The file's modes, as a string of ten letters or dashes, |
| @@ -1679,7 +1678,7 @@ specifications. | |||
| 1679 | 1678 | ||
| 1680 | @defun file-modes-symbolic-to-number modes &optional base-modes | 1679 | @defun file-modes-symbolic-to-number modes &optional base-modes |
| 1681 | This function converts a symbolic file mode specification in | 1680 | This function converts a symbolic file mode specification in |
| 1682 | @var{modes} into the equivalent integer value. If the symbolic | 1681 | @var{modes} into the equivalent integer. If the symbolic |
| 1683 | specification is based on an existing file, that file's mode bits are | 1682 | specification is based on an existing file, that file's mode bits are |
| 1684 | taken from the optional argument @var{base-modes}; if that argument is | 1683 | taken from the optional argument @var{base-modes}; if that argument is |
| 1685 | omitted or @code{nil}, it defaults to 0, i.e., no access rights at | 1684 | omitted or @code{nil}, it defaults to 0, i.e., no access rights at |
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 59881afb903..e896d1b4c04 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi | |||
| @@ -998,7 +998,7 @@ used instead. | |||
| 998 | @cindex gamma correction | 998 | @cindex gamma correction |
| 999 | If this is a number, Emacs performs ``gamma correction'' which adjusts | 999 | If this is a number, Emacs performs ``gamma correction'' which adjusts |
| 1000 | the brightness of all colors. The value should be the screen gamma of | 1000 | the brightness of all colors. The value should be the screen gamma of |
| 1001 | your display, a floating point number. | 1001 | your display. |
| 1002 | 1002 | ||
| 1003 | Usual PC monitors have a screen gamma of 2.2, so color values in | 1003 | Usual PC monitors have a screen gamma of 2.2, so color values in |
| 1004 | Emacs, and in X windows generally, are calibrated to display properly | 1004 | Emacs, and in X windows generally, are calibrated to display properly |
diff --git a/doc/lispref/hash.texi b/doc/lispref/hash.texi index 0c82bb59784..536777add72 100644 --- a/doc/lispref/hash.texi +++ b/doc/lispref/hash.texi | |||
| @@ -73,7 +73,7 @@ alternatives: | |||
| 73 | @item eql | 73 | @item eql |
| 74 | Keys which are numbers are ``the same'' if they are @code{equal}, that | 74 | Keys which are numbers are ``the same'' if they are @code{equal}, that |
| 75 | is, if they are equal in value and either both are integers or both | 75 | is, if they are equal in value and either both are integers or both |
| 76 | are floating point numbers; otherwise, two distinct objects are never | 76 | are floating point; otherwise, two distinct objects are never |
| 77 | ``the same''. | 77 | ``the same''. |
| 78 | 78 | ||
| 79 | @item eq | 79 | @item eq |
| @@ -134,7 +134,7 @@ larger, at that time. | |||
| 134 | 134 | ||
| 135 | If @var{rehash-size} is an integer, it should be positive, and the hash | 135 | If @var{rehash-size} is an integer, it should be positive, and the hash |
| 136 | table grows by adding that much to the nominal size. If | 136 | table grows by adding that much to the nominal size. If |
| 137 | @var{rehash-size} is a floating point number, it had better be greater | 137 | @var{rehash-size} is floating point, it had better be greater |
| 138 | than 1, and the hash table grows by multiplying the old size by that | 138 | than 1, and the hash table grows by multiplying the old size by that |
| 139 | number. | 139 | number. |
| 140 | 140 | ||
| @@ -143,7 +143,7 @@ The default value is 1.5. | |||
| 143 | @item :rehash-threshold @var{threshold} | 143 | @item :rehash-threshold @var{threshold} |
| 144 | This specifies the criterion for when the hash table is ``full'' (so | 144 | This specifies the criterion for when the hash table is ``full'' (so |
| 145 | it should be made larger). The value, @var{threshold}, should be a | 145 | it should be made larger). The value, @var{threshold}, should be a |
| 146 | positive floating point number, no greater than 1. The hash table is | 146 | positive floating-point number, no greater than 1. The hash table is |
| 147 | ``full'' whenever the actual number of entries exceeds this fraction | 147 | ``full'' whenever the actual number of entries exceeds this fraction |
| 148 | of the nominal size. The default for @var{threshold} is 0.8. | 148 | of the nominal size. The default for @var{threshold} is 0.8. |
| 149 | @end table | 149 | @end table |
| @@ -266,7 +266,7 @@ return non-@code{nil} if they are considered ``the same''. | |||
| 266 | 266 | ||
| 267 | The function @var{hash-fn} should accept one argument, a key, and return | 267 | The function @var{hash-fn} should accept one argument, a key, and return |
| 268 | an integer that is the ``hash code'' of that key. For good results, the | 268 | an integer that is the ``hash code'' of that key. For good results, the |
| 269 | function should use the whole range of integer values for hash codes, | 269 | function should use the whole range of integers for hash codes, |
| 270 | including negative integers. | 270 | including negative integers. |
| 271 | 271 | ||
| 272 | The specified functions are stored in the property list of @var{name} | 272 | The specified functions are stored in the property list of @var{name} |
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index 13bd9de9348..3eaef134f74 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi | |||
| @@ -517,8 +517,8 @@ done so far in this Emacs session. | |||
| 517 | 517 | ||
| 518 | @defvar gc-elapsed | 518 | @defvar gc-elapsed |
| 519 | This variable contains the total number of seconds of elapsed time | 519 | This variable contains the total number of seconds of elapsed time |
| 520 | during garbage collection so far in this Emacs session, as a floating | 520 | during garbage collection so far in this Emacs session, as a |
| 521 | point number. | 521 | floating-point number. |
| 522 | @end defvar | 522 | @end defvar |
| 523 | 523 | ||
| 524 | @node Memory Usage | 524 | @node Memory Usage |
| @@ -917,7 +917,7 @@ following basic data types: integer, symbol, string, cons cell, float, | |||
| 917 | vectorlike or miscellaneous object. Each of these data types has the | 917 | vectorlike or miscellaneous object. Each of these data types has the |
| 918 | corresponding tag value. All tags are enumerated by @code{enum Lisp_Type} | 918 | corresponding tag value. All tags are enumerated by @code{enum Lisp_Type} |
| 919 | and placed into a 3-bit bitfield of the @code{Lisp_Object}. The rest of the | 919 | and placed into a 3-bit bitfield of the @code{Lisp_Object}. The rest of the |
| 920 | bits is the value itself. Integer values are immediate, i.e., directly | 920 | bits is the value itself. Integers are immediate, i.e., directly |
| 921 | represented by those @dfn{value bits}, and all other objects are represented | 921 | represented by those @dfn{value bits}, and all other objects are represented |
| 922 | by the C pointers to a corresponding object allocated from the heap. Width | 922 | by the C pointers to a corresponding object allocated from the heap. Width |
| 923 | of the @code{Lisp_Object} is platform- and configuration-dependent: usually | 923 | of the @code{Lisp_Object} is platform- and configuration-dependent: usually |
| @@ -945,7 +945,7 @@ Array, a fixed-size set of Lisp objects which may be accessed by an index. | |||
| 945 | Symbol, the unique-named entity commonly used as an identifier. | 945 | Symbol, the unique-named entity commonly used as an identifier. |
| 946 | 946 | ||
| 947 | @item struct Lisp_Float | 947 | @item struct Lisp_Float |
| 948 | Floating point value. | 948 | Floating-point value. |
| 949 | 949 | ||
| 950 | @item union Lisp_Misc | 950 | @item union Lisp_Misc |
| 951 | Miscellaneous kinds of objects which don't fit into any of the above. | 951 | Miscellaneous kinds of objects which don't fit into any of the above. |
| @@ -1606,7 +1606,7 @@ although @code{off_t} is always signed, @code{time_t} need not be. | |||
| 1606 | 1606 | ||
| 1607 | @item | 1607 | @item |
| 1608 | Prefer the Emacs-defined type @code{printmax_t} for representing | 1608 | Prefer the Emacs-defined type @code{printmax_t} for representing |
| 1609 | values that might be any signed integer value that can be printed, | 1609 | values that might be any signed integer that can be printed, |
| 1610 | using a @code{printf}-family function. | 1610 | using a @code{printf}-family function. |
| 1611 | 1611 | ||
| 1612 | @item | 1612 | @item |
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index a372cecb818..a2168d3e53a 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi | |||
| @@ -2760,7 +2760,7 @@ The value is an integer, a number of pixels. The default is 1. | |||
| 2760 | 2760 | ||
| 2761 | @defvar tool-bar-border | 2761 | @defvar tool-bar-border |
| 2762 | This variable specifies the height of the border drawn below the tool | 2762 | This variable specifies the height of the border drawn below the tool |
| 2763 | bar area. An integer value specifies height as a number of pixels. | 2763 | bar area. An integer specifies height as a number of pixels. |
| 2764 | If the value is one of @code{internal-border-width} (the default) or | 2764 | If the value is one of @code{internal-border-width} (the default) or |
| 2765 | @code{border-width}, the tool bar border height corresponds to the | 2765 | @code{border-width}, the tool bar border height corresponds to the |
| 2766 | corresponding frame parameter. | 2766 | corresponding frame parameter. |
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi index ed18c038e85..cde7d9ce44c 100644 --- a/doc/lispref/lists.texi +++ b/doc/lispref/lists.texi | |||
| @@ -646,8 +646,8 @@ If @var{separation} is 0 and @var{to} is neither @code{nil} nor | |||
| 646 | numerically equal to @var{from}, @code{number-sequence} signals an | 646 | numerically equal to @var{from}, @code{number-sequence} signals an |
| 647 | error, since those arguments specify an infinite sequence. | 647 | error, since those arguments specify an infinite sequence. |
| 648 | 648 | ||
| 649 | All arguments can be integers or floating point numbers. However, | 649 | All arguments are numbers. |
| 650 | floating point arguments can be tricky, because floating point | 650 | Floating-point arguments can be tricky, because floating-point |
| 651 | arithmetic is inexact. For instance, depending on the machine, it may | 651 | arithmetic is inexact. For instance, depending on the machine, it may |
| 652 | quite well happen that @code{(number-sequence 0.4 0.6 0.2)} returns | 652 | quite well happen that @code{(number-sequence 0.4 0.6 0.2)} returns |
| 653 | the one element list @code{(0.4)}, whereas | 653 | the one element list @code{(0.4)}, whereas |
| @@ -1405,7 +1405,7 @@ sample-list | |||
| 1405 | @defun memql object list | 1405 | @defun memql object list |
| 1406 | The function @code{memql} tests to see whether @var{object} is a member | 1406 | The function @code{memql} tests to see whether @var{object} is a member |
| 1407 | of @var{list}, comparing members with @var{object} using @code{eql}, | 1407 | of @var{list}, comparing members with @var{object} using @code{eql}, |
| 1408 | so floating point elements are compared by value. | 1408 | so floating-point elements are compared by value. |
| 1409 | If @var{object} is a member, @code{memql} returns a list starting with | 1409 | If @var{object} is a member, @code{memql} returns a list starting with |
| 1410 | its first occurrence in @var{list}. Otherwise, it returns @code{nil}. | 1410 | its first occurrence in @var{list}. Otherwise, it returns @code{nil}. |
| 1411 | 1411 | ||
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index fded0dfdd92..5b4e29c57a3 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi | |||
| @@ -1967,7 +1967,7 @@ appears on the screen at a time. | |||
| 1967 | Like @code{y-or-n-p}, except that if the user fails to answer within | 1967 | Like @code{y-or-n-p}, except that if the user fails to answer within |
| 1968 | @var{seconds} seconds, this function stops waiting and returns | 1968 | @var{seconds} seconds, this function stops waiting and returns |
| 1969 | @var{default}. It works by setting up a timer; see @ref{Timers}. | 1969 | @var{default}. It works by setting up a timer; see @ref{Timers}. |
| 1970 | The argument @var{seconds} may be an integer or a floating point number. | 1970 | The argument @var{seconds} should be a number. |
| 1971 | @end defun | 1971 | @end defun |
| 1972 | 1972 | ||
| 1973 | @defun yes-or-no-p prompt | 1973 | @defun yes-or-no-p prompt |
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index 43766d5087a..d5bfacca976 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi | |||
| @@ -50,7 +50,7 @@ inclusive. Emacs extends this range with codepoints in the range | |||
| 50 | @code{#x110000..#x3FFFFF}, which it uses for representing characters | 50 | @code{#x110000..#x3FFFFF}, which it uses for representing characters |
| 51 | that are not unified with Unicode and @dfn{raw 8-bit bytes} that | 51 | that are not unified with Unicode and @dfn{raw 8-bit bytes} that |
| 52 | cannot be interpreted as characters. Thus, a character codepoint in | 52 | cannot be interpreted as characters. Thus, a character codepoint in |
| 53 | Emacs is a 22-bit integer number. | 53 | Emacs is a 22-bit integer. |
| 54 | 54 | ||
| 55 | @cindex internal representation of characters | 55 | @cindex internal representation of characters |
| 56 | @cindex characters, representation in buffers and strings | 56 | @cindex characters, representation in buffers and strings |
| @@ -259,7 +259,7 @@ character data, @var{character}. It signals an error if | |||
| 259 | @defun multibyte-char-to-unibyte char | 259 | @defun multibyte-char-to-unibyte char |
| 260 | This converts the multibyte character @var{char} to a unibyte | 260 | This converts the multibyte character @var{char} to a unibyte |
| 261 | character, and returns that character. If @var{char} is neither | 261 | character, and returns that character. If @var{char} is neither |
| 262 | @acronym{ASCII} nor eight-bit, the function returns -1. | 262 | @acronym{ASCII} nor eight-bit, the function returns @minus{}1. |
| 263 | @end defun | 263 | @end defun |
| 264 | 264 | ||
| 265 | @defun unibyte-char-to-multibyte char | 265 | @defun unibyte-char-to-multibyte char |
| @@ -451,7 +451,7 @@ is @code{Cn}. | |||
| 451 | 451 | ||
| 452 | @item canonical-combining-class | 452 | @item canonical-combining-class |
| 453 | Corresponds to the @code{Canonical_Combining_Class} Unicode property. | 453 | Corresponds to the @code{Canonical_Combining_Class} Unicode property. |
| 454 | The value is an integer number. For unassigned codepoints, the value | 454 | The value is an integer. For unassigned codepoints, the value |
| 455 | is zero. | 455 | is zero. |
| 456 | 456 | ||
| 457 | @cindex bidirectional class of characters | 457 | @cindex bidirectional class of characters |
| @@ -479,13 +479,13 @@ unassigned codepoints, the value is the character itself. | |||
| 479 | @item decimal-digit-value | 479 | @item decimal-digit-value |
| 480 | Corresponds to the Unicode @code{Numeric_Value} property for | 480 | Corresponds to the Unicode @code{Numeric_Value} property for |
| 481 | characters whose @code{Numeric_Type} is @samp{Decimal}. The value is | 481 | characters whose @code{Numeric_Type} is @samp{Decimal}. The value is |
| 482 | an integer number. For unassigned codepoints, the value is | 482 | an integer. For unassigned codepoints, the value is |
| 483 | @code{nil}, which means @acronym{NaN}, or ``not-a-number''. | 483 | @code{nil}, which means @acronym{NaN}, or ``not-a-number''. |
| 484 | 484 | ||
| 485 | @item digit-value | 485 | @item digit-value |
| 486 | Corresponds to the Unicode @code{Numeric_Value} property for | 486 | Corresponds to the Unicode @code{Numeric_Value} property for |
| 487 | characters whose @code{Numeric_Type} is @samp{Digit}. The value is an | 487 | characters whose @code{Numeric_Type} is @samp{Digit}. The value is an |
| 488 | integer number. Examples of such characters include compatibility | 488 | integer. Examples of such characters include compatibility |
| 489 | subscript and superscript digits, for which the value is the | 489 | subscript and superscript digits, for which the value is the |
| 490 | corresponding number. For unassigned codepoints, the value is | 490 | corresponding number. For unassigned codepoints, the value is |
| 491 | @code{nil}, which means @acronym{NaN}. | 491 | @code{nil}, which means @acronym{NaN}. |
| @@ -493,7 +493,7 @@ corresponding number. For unassigned codepoints, the value is | |||
| 493 | @item numeric-value | 493 | @item numeric-value |
| 494 | Corresponds to the Unicode @code{Numeric_Value} property for | 494 | Corresponds to the Unicode @code{Numeric_Value} property for |
| 495 | characters whose @code{Numeric_Type} is @samp{Numeric}. The value of | 495 | characters whose @code{Numeric_Type} is @samp{Numeric}. The value of |
| 496 | this property is an integer or a floating-point number. Examples of | 496 | this property is a number. Examples of |
| 497 | characters that have this property include fractions, subscripts, | 497 | characters that have this property include fractions, subscripts, |
| 498 | superscripts, Roman numerals, currency numerators, and encircled | 498 | superscripts, Roman numerals, currency numerators, and encircled |
| 499 | numbers. For example, the value of this property for the character | 499 | numbers. For example, the value of this property for the character |
diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi index 2e8fefed1c5..d202877e8ad 100644 --- a/doc/lispref/numbers.texi +++ b/doc/lispref/numbers.texi | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | GNU Emacs supports two numeric data types: @dfn{integers} and | 11 | GNU Emacs supports two numeric data types: @dfn{integers} and |
| 12 | @dfn{floating point numbers}. Integers are whole numbers such as | 12 | @dfn{floating point numbers}. Integers are whole numbers such as |
| 13 | @minus{}3, 0, 7, 13, and 511. Their values are exact. Floating point | 13 | @minus{}3, 0, 7, 13, and 511. Their values are exact. Floating-point |
| 14 | numbers are numbers with fractional parts, such as @minus{}4.5, 0.0, or | 14 | numbers are numbers with fractional parts, such as @minus{}4.5, 0.0, or |
| 15 | 2.71828. They can also be expressed in exponential notation: 1.5e2 | 15 | 2.71828. They can also be expressed in exponential notation: 1.5e2 |
| 16 | equals 150; in this example, @samp{e2} stands for ten to the second | 16 | equals 150; in this example, @samp{e2} stands for ten to the second |
| @@ -24,7 +24,7 @@ exact; they have a fixed, limited amount of precision. | |||
| 24 | * Comparison of Numbers:: Equality and inequality predicates. | 24 | * Comparison of Numbers:: Equality and inequality predicates. |
| 25 | * Numeric Conversions:: Converting float to integer and vice versa. | 25 | * Numeric Conversions:: Converting float to integer and vice versa. |
| 26 | * Arithmetic Operations:: How to add, subtract, multiply and divide. | 26 | * Arithmetic Operations:: How to add, subtract, multiply and divide. |
| 27 | * Rounding Operations:: Explicitly rounding floating point numbers. | 27 | * Rounding Operations:: Explicitly rounding floating-point numbers. |
| 28 | * Bitwise Operations:: Logical and, or, not, shifting. | 28 | * Bitwise Operations:: Logical and, or, not, shifting. |
| 29 | * Math Functions:: Trig, exponential and logarithmic functions. | 29 | * Math Functions:: Trig, exponential and logarithmic functions. |
| 30 | * Random Numbers:: Obtaining random integers, predictable or not. | 30 | * Random Numbers:: Obtaining random integers, predictable or not. |
| @@ -36,7 +36,7 @@ exact; they have a fixed, limited amount of precision. | |||
| 36 | The range of values for an integer depends on the machine. The | 36 | The range of values for an integer depends on the machine. The |
| 37 | minimum range is @minus{}536870912 to 536870911 (30 bits; i.e., | 37 | minimum range is @minus{}536870912 to 536870911 (30 bits; i.e., |
| 38 | @ifnottex | 38 | @ifnottex |
| 39 | -2**29 | 39 | @minus{}2**29 |
| 40 | @end ifnottex | 40 | @end ifnottex |
| 41 | @tex | 41 | @tex |
| 42 | @math{-2^{29}} | 42 | @math{-2^{29}} |
| @@ -122,7 +122,7 @@ complement} notation.) | |||
| 122 | 1111...111011 (30 bits total) | 122 | 1111...111011 (30 bits total) |
| 123 | @end example | 123 | @end example |
| 124 | 124 | ||
| 125 | In this implementation, the largest 30-bit binary integer value is | 125 | In this implementation, the largest 30-bit binary integer is |
| 126 | 536,870,911 in decimal. In binary, it looks like this: | 126 | 536,870,911 in decimal. In binary, it looks like this: |
| 127 | 127 | ||
| 128 | @example | 128 | @example |
| @@ -145,15 +145,15 @@ arguments to such functions may be either numbers or markers, we often | |||
| 145 | give these arguments the name @var{number-or-marker}. When the argument | 145 | give these arguments the name @var{number-or-marker}. When the argument |
| 146 | value is a marker, its position value is used and its buffer is ignored. | 146 | value is a marker, its position value is used and its buffer is ignored. |
| 147 | 147 | ||
| 148 | @cindex largest Lisp integer number | 148 | @cindex largest Lisp integer |
| 149 | @cindex maximum Lisp integer number | 149 | @cindex maximum Lisp integer |
| 150 | @defvar most-positive-fixnum | 150 | @defvar most-positive-fixnum |
| 151 | The value of this variable is the largest integer that Emacs Lisp | 151 | The value of this variable is the largest integer that Emacs Lisp |
| 152 | can handle. | 152 | can handle. |
| 153 | @end defvar | 153 | @end defvar |
| 154 | 154 | ||
| 155 | @cindex smallest Lisp integer number | 155 | @cindex smallest Lisp integer |
| 156 | @cindex minimum Lisp integer number | 156 | @cindex minimum Lisp integer |
| 157 | @defvar most-negative-fixnum | 157 | @defvar most-negative-fixnum |
| 158 | The value of this variable is the smallest integer that Emacs Lisp can | 158 | The value of this variable is the smallest integer that Emacs Lisp can |
| 159 | handle. It is negative. | 159 | handle. It is negative. |
| @@ -164,33 +164,33 @@ integer between zero and the value of @code{max-char}, inclusive, is | |||
| 164 | considered to be valid as a character. @xref{String Basics}. | 164 | considered to be valid as a character. @xref{String Basics}. |
| 165 | 165 | ||
| 166 | @node Float Basics | 166 | @node Float Basics |
| 167 | @section Floating Point Basics | 167 | @section Floating-Point Basics |
| 168 | 168 | ||
| 169 | @cindex @acronym{IEEE} floating point | 169 | @cindex @acronym{IEEE} floating point |
| 170 | Floating point numbers are useful for representing numbers that are | 170 | Floating-point numbers are useful for representing numbers that are |
| 171 | not integral. The precise range of floating point numbers is | 171 | not integral. The precise range of floating-point numbers is |
| 172 | machine-specific; it is the same as the range of the C data type | 172 | machine-specific; it is the same as the range of the C data type |
| 173 | @code{double} on the machine you are using. Emacs uses the | 173 | @code{double} on the machine you are using. Emacs uses the |
| 174 | @acronym{IEEE} floating point standard, which is supported by all | 174 | @acronym{IEEE} floating-point standard, which is supported by all |
| 175 | modern computers. | 175 | modern computers. |
| 176 | 176 | ||
| 177 | The read syntax for floating point numbers requires either a decimal | 177 | The read syntax for floating-point numbers requires either a decimal |
| 178 | point (with at least one digit following), an exponent, or both. For | 178 | point (with at least one digit following), an exponent, or both. For |
| 179 | example, @samp{1500.0}, @samp{15e2}, @samp{15.0e2}, @samp{1.5e3}, and | 179 | example, @samp{1500.0}, @samp{15e2}, @samp{15.0e2}, @samp{1.5e3}, and |
| 180 | @samp{.15e4} are five ways of writing a floating point number whose | 180 | @samp{.15e4} are five ways of writing a floating-point number whose |
| 181 | value is 1500. They are all equivalent. You can also use a minus | 181 | value is 1500. They are all equivalent. You can also use a minus |
| 182 | sign to write negative floating point numbers, as in @samp{-1.0}. | 182 | sign to write negative floating-point numbers, as in @samp{-1.0}. |
| 183 | 183 | ||
| 184 | Emacs Lisp treats @code{-0.0} as equal to ordinary zero (with | 184 | Emacs Lisp treats @code{-0.0} as numerically equal to ordinary zero (with |
| 185 | respect to @code{equal} and @code{=}), even though the two are | 185 | respect to @code{equal} and @code{=}), even though the two are |
| 186 | distinguishable in the @acronym{IEEE} floating point standard. | 186 | distinguishable in the @acronym{IEEE} floating-point standard. |
| 187 | 187 | ||
| 188 | @cindex positive infinity | 188 | @cindex positive infinity |
| 189 | @cindex negative infinity | 189 | @cindex negative infinity |
| 190 | @cindex infinity | 190 | @cindex infinity |
| 191 | @cindex NaN | 191 | @cindex NaN |
| 192 | The @acronym{IEEE} floating point standard supports positive | 192 | The @acronym{IEEE} floating-point standard supports positive |
| 193 | infinity and negative infinity as floating point values. It also | 193 | infinity and negative infinity as floating-point values. It also |
| 194 | provides for a class of values called NaN or ``not-a-number''; | 194 | provides for a class of values called NaN or ``not-a-number''; |
| 195 | numerical functions return such values in cases where there is no | 195 | numerical functions return such values in cases where there is no |
| 196 | correct answer. For example, @code{(/ 0.0 0.0)} returns a NaN@. (NaN | 196 | correct answer. For example, @code{(/ 0.0 0.0)} returns a NaN@. (NaN |
| @@ -204,7 +204,7 @@ example, @code{(log -1.0)} typically returns a NaN, but on | |||
| 204 | non-@acronym{IEEE} platforms it returns an implementation-defined | 204 | non-@acronym{IEEE} platforms it returns an implementation-defined |
| 205 | value. | 205 | value. |
| 206 | 206 | ||
| 207 | Here are the read syntaxes for these special floating point values: | 207 | Here are the read syntaxes for these special floating-point values: |
| 208 | 208 | ||
| 209 | @table @asis | 209 | @table @asis |
| 210 | @item positive infinity | 210 | @item positive infinity |
| @@ -272,8 +272,8 @@ its argument. See also @code{integer-or-marker-p} and | |||
| 272 | @code{number-or-marker-p}, in @ref{Predicates on Markers}. | 272 | @code{number-or-marker-p}, in @ref{Predicates on Markers}. |
| 273 | 273 | ||
| 274 | @defun floatp object | 274 | @defun floatp object |
| 275 | This predicate tests whether its argument is a floating point | 275 | This predicate tests whether its argument is floating point |
| 276 | number and returns @code{t} if so, @code{nil} otherwise. | 276 | and returns @code{t} if so, @code{nil} otherwise. |
| 277 | @end defun | 277 | @end defun |
| 278 | 278 | ||
| 279 | @defun integerp object | 279 | @defun integerp object |
| @@ -310,13 +310,13 @@ if so, @code{nil} otherwise. The argument must be a number. | |||
| 310 | @cindex comparing numbers | 310 | @cindex comparing numbers |
| 311 | 311 | ||
| 312 | To test numbers for numerical equality, you should normally use | 312 | To test numbers for numerical equality, you should normally use |
| 313 | @code{=}, not @code{eq}. There can be many distinct floating point | 313 | @code{=}, not @code{eq}. There can be many distinct floating-point |
| 314 | number objects with the same numeric value. If you use @code{eq} to | 314 | objects with the same numeric value. If you use @code{eq} to |
| 315 | compare them, then you test whether two values are the same | 315 | compare them, then you test whether two values are the same |
| 316 | @emph{object}. By contrast, @code{=} compares only the numeric values | 316 | @emph{object}. By contrast, @code{=} compares only the numeric values |
| 317 | of the objects. | 317 | of the objects. |
| 318 | 318 | ||
| 319 | In Emacs Lisp, each integer value is a unique Lisp object. | 319 | In Emacs Lisp, each integer is a unique Lisp object. |
| 320 | Therefore, @code{eq} is equivalent to @code{=} where integers are | 320 | Therefore, @code{eq} is equivalent to @code{=} where integers are |
| 321 | concerned. It is sometimes convenient to use @code{eq} for comparing | 321 | concerned. It is sometimes convenient to use @code{eq} for comparing |
| 322 | an unknown value with an integer, because @code{eq} does not report an | 322 | an unknown value with an integer, because @code{eq} does not report an |
| @@ -328,12 +328,12 @@ use @code{=} if you can, even for comparing integers. | |||
| 328 | Sometimes it is useful to compare numbers with @code{equal}, which | 328 | Sometimes it is useful to compare numbers with @code{equal}, which |
| 329 | treats two numbers as equal if they have the same data type (both | 329 | treats two numbers as equal if they have the same data type (both |
| 330 | integers, or both floating point) and the same value. By contrast, | 330 | integers, or both floating point) and the same value. By contrast, |
| 331 | @code{=} can treat an integer and a floating point number as equal. | 331 | @code{=} can treat an integer and a floating-point number as equal. |
| 332 | @xref{Equality Predicates}. | 332 | @xref{Equality Predicates}. |
| 333 | 333 | ||
| 334 | There is another wrinkle: because floating point arithmetic is not | 334 | There is another wrinkle: because floating-point arithmetic is not |
| 335 | exact, it is often a bad idea to check for equality of two floating | 335 | exact, it is often a bad idea to check for equality of floating-point |
| 336 | point values. Usually it is better to test for approximate equality. | 336 | values. Usually it is better to test for approximate equality. |
| 337 | Here's a function to do this: | 337 | Here's a function to do this: |
| 338 | 338 | ||
| 339 | @example | 339 | @example |
| @@ -351,7 +351,7 @@ Here's a function to do this: | |||
| 351 | @code{=} because Common Lisp implements multi-word integers, and two | 351 | @code{=} because Common Lisp implements multi-word integers, and two |
| 352 | distinct integer objects can have the same numeric value. Emacs Lisp | 352 | distinct integer objects can have the same numeric value. Emacs Lisp |
| 353 | can have just one integer object for any given value because it has a | 353 | can have just one integer object for any given value because it has a |
| 354 | limited range of integer values. | 354 | limited range of integers. |
| 355 | @end quotation | 355 | @end quotation |
| 356 | 356 | ||
| 357 | @defun = number-or-marker &rest number-or-markers | 357 | @defun = number-or-marker &rest number-or-markers |
| @@ -397,7 +397,7 @@ otherwise. | |||
| 397 | 397 | ||
| 398 | @defun max number-or-marker &rest numbers-or-markers | 398 | @defun max number-or-marker &rest numbers-or-markers |
| 399 | This function returns the largest of its arguments. | 399 | This function returns the largest of its arguments. |
| 400 | If any of the arguments is floating-point, the value is returned | 400 | If any of the arguments is floating point, the value is returned |
| 401 | as floating point, even if it was given as an integer. | 401 | as floating point, even if it was given as an integer. |
| 402 | 402 | ||
| 403 | @example | 403 | @example |
| @@ -412,7 +412,7 @@ as floating point, even if it was given as an integer. | |||
| 412 | 412 | ||
| 413 | @defun min number-or-marker &rest numbers-or-markers | 413 | @defun min number-or-marker &rest numbers-or-markers |
| 414 | This function returns the smallest of its arguments. | 414 | This function returns the smallest of its arguments. |
| 415 | If any of the arguments is floating-point, the value is returned | 415 | If any of the arguments is floating point, the value is returned |
| 416 | as floating point, even if it was given as an integer. | 416 | as floating point, even if it was given as an integer. |
| 417 | 417 | ||
| 418 | @example | 418 | @example |
| @@ -435,20 +435,20 @@ To convert an integer to floating point, use the function @code{float}. | |||
| 435 | 435 | ||
| 436 | @defun float number | 436 | @defun float number |
| 437 | This returns @var{number} converted to floating point. | 437 | This returns @var{number} converted to floating point. |
| 438 | If @var{number} is already a floating point number, @code{float} returns | 438 | If @var{number} is already floating point, @code{float} returns |
| 439 | it unchanged. | 439 | it unchanged. |
| 440 | @end defun | 440 | @end defun |
| 441 | 441 | ||
| 442 | There are four functions to convert floating point numbers to | 442 | There are four functions to convert floating-point numbers to |
| 443 | integers; they differ in how they round. All accept an argument | 443 | integers; they differ in how they round. All accept an argument |
| 444 | @var{number} and an optional argument @var{divisor}. Both arguments | 444 | @var{number} and an optional argument @var{divisor}. Both arguments |
| 445 | may be integers or floating point numbers. @var{divisor} may also be | 445 | may be integers or floating-point numbers. @var{divisor} may also be |
| 446 | @code{nil}. If @var{divisor} is @code{nil} or omitted, these | 446 | @code{nil}. If @var{divisor} is @code{nil} or omitted, these |
| 447 | functions convert @var{number} to an integer, or return it unchanged | 447 | functions convert @var{number} to an integer, or return it unchanged |
| 448 | if it already is an integer. If @var{divisor} is non-@code{nil}, they | 448 | if it already is an integer. If @var{divisor} is non-@code{nil}, they |
| 449 | divide @var{number} by @var{divisor} and convert the result to an | 449 | divide @var{number} by @var{divisor} and convert the result to an |
| 450 | integer. If @var{divisor} is zero (whether integer or | 450 | integer. If @var{divisor} is zero (whether integer or |
| 451 | floating-point), Emacs signals an @code{arith-error} error. | 451 | floating point), Emacs signals an @code{arith-error} error. |
| 452 | 452 | ||
| 453 | @defun truncate number &optional divisor | 453 | @defun truncate number &optional divisor |
| 454 | This returns @var{number}, converted to an integer by rounding towards | 454 | This returns @var{number}, converted to an integer by rounding towards |
| @@ -529,8 +529,8 @@ depending on your machine. | |||
| 529 | (addition, subtraction, multiplication, and division), as well as | 529 | (addition, subtraction, multiplication, and division), as well as |
| 530 | remainder and modulus functions, and functions to add or subtract 1. | 530 | remainder and modulus functions, and functions to add or subtract 1. |
| 531 | Except for @code{%}, each of these functions accepts both integer and | 531 | Except for @code{%}, each of these functions accepts both integer and |
| 532 | floating point arguments, and returns a floating point number if any | 532 | floating-point arguments, and returns a floating-point number if any |
| 533 | argument is a floating point number. | 533 | argument is floating point. |
| 534 | 534 | ||
| 535 | It is important to note that in Emacs Lisp, arithmetic functions | 535 | It is important to note that in Emacs Lisp, arithmetic functions |
| 536 | do not check for overflow. Thus @code{(1+ 536870911)} may evaluate to | 536 | do not check for overflow. Thus @code{(1+ 536870911)} may evaluate to |
| @@ -659,9 +659,9 @@ does not happen in practice.) | |||
| 659 | 659 | ||
| 660 | @cindex @code{arith-error} in division | 660 | @cindex @code{arith-error} in division |
| 661 | If you divide an integer by the integer 0, Emacs signals an | 661 | If you divide an integer by the integer 0, Emacs signals an |
| 662 | @code{arith-error} error (@pxref{Errors}). If you divide a floating | 662 | @code{arith-error} error (@pxref{Errors}). Floating-point division of |
| 663 | point number by 0, or divide by the floating point number 0.0, the | 663 | a nonzero number by zero yields either positive or negative infinity |
| 664 | result is either positive or negative infinity (@pxref{Float Basics}). | 664 | (@pxref{Float Basics}). |
| 665 | @end defun | 665 | @end defun |
| 666 | 666 | ||
| 667 | @defun % dividend divisor | 667 | @defun % dividend divisor |
| @@ -701,7 +701,7 @@ in other words, the remainder after division of @var{dividend} | |||
| 701 | by @var{divisor}, but with the same sign as @var{divisor}. | 701 | by @var{divisor}, but with the same sign as @var{divisor}. |
| 702 | The arguments must be numbers or markers. | 702 | The arguments must be numbers or markers. |
| 703 | 703 | ||
| 704 | Unlike @code{%}, @code{mod} permits floating point arguments; it | 704 | Unlike @code{%}, @code{mod} permits floating-point arguments; it |
| 705 | rounds the quotient downward (towards minus infinity) to an integer, | 705 | rounds the quotient downward (towards minus infinity) to an integer, |
| 706 | and uses that quotient to compute the remainder. | 706 | and uses that quotient to compute the remainder. |
| 707 | 707 | ||
| @@ -751,30 +751,30 @@ Conversions}. | |||
| 751 | @cindex rounding without conversion | 751 | @cindex rounding without conversion |
| 752 | 752 | ||
| 753 | The functions @code{ffloor}, @code{fceiling}, @code{fround}, and | 753 | The functions @code{ffloor}, @code{fceiling}, @code{fround}, and |
| 754 | @code{ftruncate} take a floating point argument and return a floating | 754 | @code{ftruncate} take a floating-point argument and return a floating-point |
| 755 | point result whose value is a nearby integer. @code{ffloor} returns the | 755 | result whose value is a nearby integer. @code{ffloor} returns the |
| 756 | nearest integer below; @code{fceiling}, the nearest integer above; | 756 | nearest integer below; @code{fceiling}, the nearest integer above; |
| 757 | @code{ftruncate}, the nearest integer in the direction towards zero; | 757 | @code{ftruncate}, the nearest integer in the direction towards zero; |
| 758 | @code{fround}, the nearest integer. | 758 | @code{fround}, the nearest integer. |
| 759 | 759 | ||
| 760 | @defun ffloor float | 760 | @defun ffloor float |
| 761 | This function rounds @var{float} to the next lower integral value, and | 761 | This function rounds @var{float} to the next lower integral value, and |
| 762 | returns that value as a floating point number. | 762 | returns that value as a floating-point number. |
| 763 | @end defun | 763 | @end defun |
| 764 | 764 | ||
| 765 | @defun fceiling float | 765 | @defun fceiling float |
| 766 | This function rounds @var{float} to the next higher integral value, and | 766 | This function rounds @var{float} to the next higher integral value, and |
| 767 | returns that value as a floating point number. | 767 | returns that value as a floating-point number. |
| 768 | @end defun | 768 | @end defun |
| 769 | 769 | ||
| 770 | @defun ftruncate float | 770 | @defun ftruncate float |
| 771 | This function rounds @var{float} towards zero to an integral value, and | 771 | This function rounds @var{float} towards zero to an integral value, and |
| 772 | returns that value as a floating point number. | 772 | returns that value as a floating-point number. |
| 773 | @end defun | 773 | @end defun |
| 774 | 774 | ||
| 775 | @defun fround float | 775 | @defun fround float |
| 776 | This function rounds @var{float} to the nearest integral value, | 776 | This function rounds @var{float} to the nearest integral value, |
| 777 | and returns that value as a floating point number. | 777 | and returns that value as a floating-point number. |
| 778 | @end defun | 778 | @end defun |
| 779 | 779 | ||
| 780 | @node Bitwise Operations | 780 | @node Bitwise Operations |
| @@ -1083,7 +1083,7 @@ bit is one in the result if, and only if, the @var{n}th bit is zero in | |||
| 1083 | @cindex mathematical functions | 1083 | @cindex mathematical functions |
| 1084 | @cindex floating-point functions | 1084 | @cindex floating-point functions |
| 1085 | 1085 | ||
| 1086 | These mathematical functions allow integers as well as floating point | 1086 | These mathematical functions allow integers as well as floating-point |
| 1087 | numbers as arguments. | 1087 | numbers as arguments. |
| 1088 | 1088 | ||
| 1089 | @defun sin arg | 1089 | @defun sin arg |
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi index cfd906ba397..086abecded1 100644 --- a/doc/lispref/objects.texi +++ b/doc/lispref/objects.texi | |||
| @@ -136,7 +136,7 @@ latter are unique to Emacs Lisp. | |||
| 136 | 136 | ||
| 137 | @menu | 137 | @menu |
| 138 | * Integer Type:: Numbers without fractional parts. | 138 | * Integer Type:: Numbers without fractional parts. |
| 139 | * Floating Point Type:: Numbers with fractional parts and with a large range. | 139 | * Floating-Point Type:: Numbers with fractional parts and with a large range. |
| 140 | * Character Type:: The representation of letters, numbers and | 140 | * Character Type:: The representation of letters, numbers and |
| 141 | control characters. | 141 | control characters. |
| 142 | * Symbol Type:: A multi-use object that refers to a function, | 142 | * Symbol Type:: A multi-use object that refers to a function, |
| @@ -164,7 +164,7 @@ latter are unique to Emacs Lisp. | |||
| 164 | The range of values for integers in Emacs Lisp is @minus{}536870912 to | 164 | The range of values for integers in Emacs Lisp is @minus{}536870912 to |
| 165 | 536870911 (30 bits; i.e., | 165 | 536870911 (30 bits; i.e., |
| 166 | @ifnottex | 166 | @ifnottex |
| 167 | -2**29 | 167 | @minus{}2**29 |
| 168 | @end ifnottex | 168 | @end ifnottex |
| 169 | @tex | 169 | @tex |
| 170 | @math{-2^{29}} | 170 | @math{-2^{29}} |
| @@ -187,7 +187,7 @@ leading @samp{+} or a final @samp{.}. | |||
| 187 | 187 | ||
| 188 | @example | 188 | @example |
| 189 | @group | 189 | @group |
| 190 | -1 ; @r{The integer -1.} | 190 | -1 ; @r{The integer @minus{}1.} |
| 191 | 1 ; @r{The integer 1.} | 191 | 1 ; @r{The integer 1.} |
| 192 | 1. ; @r{Also the integer 1.} | 192 | 1. ; @r{Also the integer 1.} |
| 193 | +1 ; @r{Also the integer 1.} | 193 | +1 ; @r{Also the integer 1.} |
| @@ -197,26 +197,26 @@ leading @samp{+} or a final @samp{.}. | |||
| 197 | @noindent | 197 | @noindent |
| 198 | As a special exception, if a sequence of digits specifies an integer | 198 | As a special exception, if a sequence of digits specifies an integer |
| 199 | too large or too small to be a valid integer object, the Lisp reader | 199 | too large or too small to be a valid integer object, the Lisp reader |
| 200 | reads it as a floating-point number (@pxref{Floating Point Type}). | 200 | reads it as a floating-point number (@pxref{Floating-Point Type}). |
| 201 | For instance, if Emacs integers are 30 bits, @code{536870912} is read | 201 | For instance, if Emacs integers are 30 bits, @code{536870912} is read |
| 202 | as the floating-point number @code{536870912.0}. | 202 | as the floating-point number @code{536870912.0}. |
| 203 | 203 | ||
| 204 | @xref{Numbers}, for more information. | 204 | @xref{Numbers}, for more information. |
| 205 | 205 | ||
| 206 | @node Floating Point Type | 206 | @node Floating-Point Type |
| 207 | @subsection Floating Point Type | 207 | @subsection Floating-Point Type |
| 208 | 208 | ||
| 209 | Floating point numbers are the computer equivalent of scientific | 209 | Floating-point numbers are the computer equivalent of scientific |
| 210 | notation; you can think of a floating point number as a fraction | 210 | notation; you can think of a floating-point number as a fraction |
| 211 | together with a power of ten. The precise number of significant | 211 | together with a power of ten. The precise number of significant |
| 212 | figures and the range of possible exponents is machine-specific; Emacs | 212 | figures and the range of possible exponents is machine-specific; Emacs |
| 213 | uses the C data type @code{double} to store the value, and internally | 213 | uses the C data type @code{double} to store the value, and internally |
| 214 | this records a power of 2 rather than a power of 10. | 214 | this records a power of 2 rather than a power of 10. |
| 215 | 215 | ||
| 216 | The printed representation for floating point numbers requires either | 216 | The printed representation for floating-point numbers requires either |
| 217 | a decimal point (with at least one digit following), an exponent, or | 217 | a decimal point (with at least one digit following), an exponent, or |
| 218 | both. For example, @samp{1500.0}, @samp{15e2}, @samp{15.0e2}, | 218 | both. For example, @samp{1500.0}, @samp{15e2}, @samp{15.0e2}, |
| 219 | @samp{1.5e3}, and @samp{.15e4} are five ways of writing a floating point | 219 | @samp{1.5e3}, and @samp{.15e4} are five ways of writing a floating-point |
| 220 | number whose value is 1500. They are all equivalent. | 220 | number whose value is 1500. They are all equivalent. |
| 221 | 221 | ||
| 222 | @xref{Numbers}, for more information. | 222 | @xref{Numbers}, for more information. |
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index dda139b8d74..df30ac12e2e 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -1043,7 +1043,7 @@ number of processes trying to run on the system. | |||
| 1043 | 1043 | ||
| 1044 | By default, the values are integers that are 100 times the system load | 1044 | By default, the values are integers that are 100 times the system load |
| 1045 | averages, but if @var{use-float} is non-@code{nil}, then they are | 1045 | averages, but if @var{use-float} is non-@code{nil}, then they are |
| 1046 | returned as floating point numbers without multiplying by 100. | 1046 | returned as floating-point numbers without multiplying by 100. |
| 1047 | 1047 | ||
| 1048 | If it is impossible to obtain the load average, this function signals | 1048 | If it is impossible to obtain the load average, this function signals |
| 1049 | an error. On some platforms, access to load averages requires | 1049 | an error. On some platforms, access to load averages requires |
| @@ -1149,24 +1149,24 @@ Titles}). | |||
| 1149 | @cindex UID | 1149 | @cindex UID |
| 1150 | @defun user-real-uid | 1150 | @defun user-real-uid |
| 1151 | This function returns the real @acronym{UID} of the user. | 1151 | This function returns the real @acronym{UID} of the user. |
| 1152 | The value may be a floating point number, in the (unlikely) event that | 1152 | The value may be floating point, in the (unlikely) event that |
| 1153 | the UID is too large to fit in a Lisp integer. | 1153 | the UID is too large to fit in a Lisp integer. |
| 1154 | @end defun | 1154 | @end defun |
| 1155 | 1155 | ||
| 1156 | @defun user-uid | 1156 | @defun user-uid |
| 1157 | This function returns the effective @acronym{UID} of the user. | 1157 | This function returns the effective @acronym{UID} of the user. |
| 1158 | The value may be a floating point number. | 1158 | The value may be floating point. |
| 1159 | @end defun | 1159 | @end defun |
| 1160 | 1160 | ||
| 1161 | @cindex GID | 1161 | @cindex GID |
| 1162 | @defun group-gid | 1162 | @defun group-gid |
| 1163 | This function returns the effective @acronym{GID} of the Emacs process. | 1163 | This function returns the effective @acronym{GID} of the Emacs process. |
| 1164 | The value may be a floating point number. | 1164 | The value may be floating point. |
| 1165 | @end defun | 1165 | @end defun |
| 1166 | 1166 | ||
| 1167 | @defun group-real-gid | 1167 | @defun group-real-gid |
| 1168 | This function returns the real @acronym{GID} of the Emacs process. | 1168 | This function returns the real @acronym{GID} of the Emacs process. |
| 1169 | The value may be a floating point number. | 1169 | The value may be floating point. |
| 1170 | @end defun | 1170 | @end defun |
| 1171 | 1171 | ||
| 1172 | @defun system-users | 1172 | @defun system-users |
| @@ -1196,7 +1196,7 @@ integers, @code{(@var{sec-high} @var{sec-low} @var{microsec} | |||
| 1196 | integers, @code{(@var{sec-high} @var{sec-low} @var{microsec})}, or of | 1196 | integers, @code{(@var{sec-high} @var{sec-low} @var{microsec})}, or of |
| 1197 | two integers, @code{(@var{sec-high} @var{sec-low})}. The integers | 1197 | two integers, @code{(@var{sec-high} @var{sec-low})}. The integers |
| 1198 | @var{sec-high} and @var{sec-low} give the high and low bits of an | 1198 | @var{sec-high} and @var{sec-low} give the high and low bits of an |
| 1199 | integer number of seconds. This integer number, | 1199 | integer number of seconds. This integer, |
| 1200 | @ifnottex | 1200 | @ifnottex |
| 1201 | @var{high} * 2**16 + @var{low}, | 1201 | @var{high} * 2**16 + @var{low}, |
| 1202 | @end ifnottex | 1202 | @end ifnottex |
| @@ -1518,9 +1518,9 @@ system. | |||
| 1518 | @end defun | 1518 | @end defun |
| 1519 | 1519 | ||
| 1520 | @defun seconds-to-time seconds | 1520 | @defun seconds-to-time seconds |
| 1521 | This function converts @var{seconds}, a floating point number of | 1521 | This function converts @var{seconds}, the number of seconds since the |
| 1522 | seconds since the epoch, to a time value and returns that. To perform | 1522 | epoch, to a time value and returns that. To convert back, use |
| 1523 | the inverse conversion, use @code{float-time} (@pxref{Time of Day}). | 1523 | @code{float-time} (@pxref{Time of Day}). |
| 1524 | @end defun | 1524 | @end defun |
| 1525 | 1525 | ||
| 1526 | @defun format-seconds format-string seconds | 1526 | @defun format-seconds format-string seconds |
| @@ -1805,9 +1805,8 @@ work just like ordinary timers. | |||
| 1805 | 1805 | ||
| 1806 | @deffn Command run-with-idle-timer secs repeat function &rest args | 1806 | @deffn Command run-with-idle-timer secs repeat function &rest args |
| 1807 | Set up a timer which runs the next time Emacs is idle for @var{secs} | 1807 | Set up a timer which runs the next time Emacs is idle for @var{secs} |
| 1808 | seconds. The value of @var{secs} may be an integer or a floating | 1808 | seconds. The value of @var{secs} may be a number or a value of the type |
| 1809 | point number; a value of the type returned by @code{current-idle-time} | 1809 | returned by @code{current-idle-time}. |
| 1810 | is also allowed. | ||
| 1811 | 1810 | ||
| 1812 | If @var{repeat} is @code{nil}, the timer runs just once, the first time | 1811 | If @var{repeat} is @code{nil}, the timer runs just once, the first time |
| 1813 | Emacs remains idle for a long enough time. More often @var{repeat} is | 1812 | Emacs remains idle for a long enough time. More often @var{repeat} is |
| @@ -2155,7 +2154,7 @@ system-specific keysym. Each element has the form @code{(@var{code} | |||
| 2155 | . @var{symbol})}, where @var{code} is the numeric keysym code (not | 2154 | . @var{symbol})}, where @var{code} is the numeric keysym code (not |
| 2156 | including the ``vendor specific'' bit, | 2155 | including the ``vendor specific'' bit, |
| 2157 | @ifnottex | 2156 | @ifnottex |
| 2158 | -2**28), | 2157 | @minus{}2**28), |
| 2159 | @end ifnottex | 2158 | @end ifnottex |
| 2160 | @tex | 2159 | @tex |
| 2161 | $-2^{28}$), | 2160 | $-2^{28}$), |
| @@ -2165,7 +2164,7 @@ and @var{symbol} is the name for the function key. | |||
| 2165 | For example @code{(168 . mute-acute)} defines a system-specific key (used | 2164 | For example @code{(168 . mute-acute)} defines a system-specific key (used |
| 2166 | by HP X servers) whose numeric code is | 2165 | by HP X servers) whose numeric code is |
| 2167 | @ifnottex | 2166 | @ifnottex |
| 2168 | -2**28 | 2167 | @minus{}2**28 |
| 2169 | @end ifnottex | 2168 | @end ifnottex |
| 2170 | @tex | 2169 | @tex |
| 2171 | $-2^{28}$ | 2170 | $-2^{28}$ |
| @@ -2329,10 +2328,10 @@ be anything, though implementations are free not to display it. | |||
| 2329 | 2328 | ||
| 2330 | @item :timeout @var{timeout} | 2329 | @item :timeout @var{timeout} |
| 2331 | The timeout time in milliseconds since the display of the notification | 2330 | The timeout time in milliseconds since the display of the notification |
| 2332 | at which the notification should automatically close. If -1, the | 2331 | at which the notification should automatically close. If @minus{}1, the |
| 2333 | notification's expiration time is dependent on the notification | 2332 | notification's expiration time is dependent on the notification |
| 2334 | server's settings, and may vary for the type of notification. If 0, | 2333 | server's settings, and may vary for the type of notification. If 0, |
| 2335 | the notification never expires. Default value is -1. | 2334 | the notification never expires. Default value is @minus{}1. |
| 2336 | 2335 | ||
| 2337 | @item :urgency @var{urgency} | 2336 | @item :urgency @var{urgency} |
| 2338 | The urgency level. It can be @code{low}, @code{normal}, or @code{critical}. | 2337 | The urgency level. It can be @code{low}, @code{normal}, or @code{critical}. |
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index f149725b082..ad62b4fff63 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi | |||
| @@ -1484,7 +1484,7 @@ returns after that much time, whether or not there has been any | |||
| 1484 | subprocess output. | 1484 | subprocess output. |
| 1485 | 1485 | ||
| 1486 | The argument @var{millisec} is obsolete (and should not be used), | 1486 | The argument @var{millisec} is obsolete (and should not be used), |
| 1487 | because @var{seconds} can be a floating point number to specify | 1487 | because @var{seconds} can be floating point to specify |
| 1488 | waiting a fractional number of seconds. If @var{seconds} is 0, the | 1488 | waiting a fractional number of seconds. If @var{seconds} is 0, the |
| 1489 | function accepts whatever output is pending but does not wait. | 1489 | function accepts whatever output is pending but does not wait. |
| 1490 | 1490 | ||
| @@ -1684,7 +1684,7 @@ attribute and @var{value} is the value of that attribute. The various | |||
| 1684 | attribute @var{key}s that this function can return are listed below. | 1684 | attribute @var{key}s that this function can return are listed below. |
| 1685 | Not all platforms support all of these attributes; if an attribute is | 1685 | Not all platforms support all of these attributes; if an attribute is |
| 1686 | not supported, its association will not appear in the returned alist. | 1686 | not supported, its association will not appear in the returned alist. |
| 1687 | Values that are numbers can be either integer or floating-point, | 1687 | Values that are numbers can be either integer or floating point, |
| 1688 | depending on the magnitude of the value. | 1688 | depending on the magnitude of the value. |
| 1689 | 1689 | ||
| 1690 | @table @code | 1690 | @table @code |
diff --git a/doc/lispref/streams.texi b/doc/lispref/streams.texi index ed3a01ba810..1d549ae8916 100644 --- a/doc/lispref/streams.texi +++ b/doc/lispref/streams.texi | |||
| @@ -824,7 +824,7 @@ to bind it to @code{nil} when you bind @code{print-continuous-numbering}. | |||
| 824 | @end defvar | 824 | @end defvar |
| 825 | 825 | ||
| 826 | @defvar float-output-format | 826 | @defvar float-output-format |
| 827 | This variable specifies how to print floating point numbers. The | 827 | This variable specifies how to print floating-point numbers. The |
| 828 | default is @code{nil}, meaning use the shortest output | 828 | default is @code{nil}, meaning use the shortest output |
| 829 | that represents the number without losing information. | 829 | that represents the number without losing information. |
| 830 | 830 | ||
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 04e11fec617..24218a9cf15 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi | |||
| @@ -593,9 +593,8 @@ are used primarily for making help messages. | |||
| 593 | @cindex integer to string | 593 | @cindex integer to string |
| 594 | @cindex integer to decimal | 594 | @cindex integer to decimal |
| 595 | This function returns a string consisting of the printed base-ten | 595 | This function returns a string consisting of the printed base-ten |
| 596 | representation of @var{number}, which may be an integer or a floating | 596 | representation of @var{number}. The returned value starts with a |
| 597 | point number. The returned value starts with a minus sign if the argument is | 597 | minus sign if the argument is negative. |
| 598 | negative. | ||
| 599 | 598 | ||
| 600 | @example | 599 | @example |
| 601 | (number-to-string 256) | 600 | (number-to-string 256) |
| @@ -619,12 +618,12 @@ See also the function @code{format} in @ref{Formatting Strings}. | |||
| 619 | This function returns the numeric value of the characters in | 618 | This function returns the numeric value of the characters in |
| 620 | @var{string}. If @var{base} is non-@code{nil}, it must be an integer | 619 | @var{string}. If @var{base} is non-@code{nil}, it must be an integer |
| 621 | between 2 and 16 (inclusive), and integers are converted in that base. | 620 | between 2 and 16 (inclusive), and integers are converted in that base. |
| 622 | If @var{base} is @code{nil}, then base ten is used. Floating point | 621 | If @var{base} is @code{nil}, then base ten is used. Floating-point |
| 623 | conversion only works in base ten; we have not implemented other | 622 | conversion only works in base ten; we have not implemented other |
| 624 | radices for floating point numbers, because that would be much more | 623 | radices for floating-point numbers, because that would be much more |
| 625 | work and does not seem useful. If @var{string} looks like an integer | 624 | work and does not seem useful. If @var{string} looks like an integer |
| 626 | but its value is too large to fit into a Lisp integer, | 625 | but its value is too large to fit into a Lisp integer, |
| 627 | @code{string-to-number} returns a floating point result. | 626 | @code{string-to-number} returns a floating-point result. |
| 628 | 627 | ||
| 629 | The parsing skips spaces and tabs at the beginning of @var{string}, | 628 | The parsing skips spaces and tabs at the beginning of @var{string}, |
| 630 | then reads as much of @var{string} as it can interpret as a number in | 629 | then reads as much of @var{string} as it can interpret as a number in |
| @@ -787,15 +786,15 @@ integer. @samp{%x} uses lower case and @samp{%X} uses upper case. | |||
| 787 | Replace the specification with the character which is the value given. | 786 | Replace the specification with the character which is the value given. |
| 788 | 787 | ||
| 789 | @item %e | 788 | @item %e |
| 790 | Replace the specification with the exponential notation for a floating | 789 | Replace the specification with the exponential notation for a |
| 791 | point number. | 790 | floating-point number. |
| 792 | 791 | ||
| 793 | @item %f | 792 | @item %f |
| 794 | Replace the specification with the decimal-point notation for a floating | 793 | Replace the specification with the decimal-point notation for a |
| 795 | point number. | 794 | floating-point number. |
| 796 | 795 | ||
| 797 | @item %g | 796 | @item %g |
| 798 | Replace the specification with notation for a floating point number, | 797 | Replace the specification with notation for a floating-point number, |
| 799 | using either exponential notation or decimal-point notation, whichever | 798 | using either exponential notation or decimal-point notation, whichever |
| 800 | is shorter. | 799 | is shorter. |
| 801 | 800 | ||
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index d93f937bd81..1a9a3d0a0ec 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -3269,7 +3269,7 @@ overlay and text property strings present at the current buffer | |||
| 3269 | position. You can place the cursor on any desired character of these | 3269 | position. You can place the cursor on any desired character of these |
| 3270 | strings by giving that character a non-@code{nil} @code{cursor} text | 3270 | strings by giving that character a non-@code{nil} @code{cursor} text |
| 3271 | property. In addition, if the value of the @code{cursor} property is | 3271 | property. In addition, if the value of the @code{cursor} property is |
| 3272 | an integer number, it specifies the number of buffer's character | 3272 | an integer, it specifies the number of buffer's character |
| 3273 | positions, starting with the position where the overlay or the | 3273 | positions, starting with the position where the overlay or the |
| 3274 | @code{display} property begins, for which the cursor should be | 3274 | @code{display} property begins, for which the cursor should be |
| 3275 | displayed on that character. Specifically, if the value of the | 3275 | displayed on that character. Specifically, if the value of the |
| @@ -3283,7 +3283,7 @@ text property begins in the buffer. | |||
| 3283 | In other words, the string character with the @code{cursor} property | 3283 | In other words, the string character with the @code{cursor} property |
| 3284 | of any non-@code{nil} value is the character where to display the | 3284 | of any non-@code{nil} value is the character where to display the |
| 3285 | cursor. The value of the property says for which buffer positions to | 3285 | cursor. The value of the property says for which buffer positions to |
| 3286 | display the cursor there. If the value is an integer number @var{n}, | 3286 | display the cursor there. If the value is an integer @var{n}, |
| 3287 | the cursor is displayed there when point is anywhere between the | 3287 | the cursor is displayed there when point is anywhere between the |
| 3288 | beginning of the overlay or @code{display} property and @var{n} | 3288 | beginning of the overlay or @code{display} property and @var{n} |
| 3289 | positions after that. If the value is anything else and | 3289 | positions after that. If the value is anything else and |
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index dbeebcc6ee6..e890dbce359 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi | |||
| @@ -828,7 +828,7 @@ following example: | |||
| 828 | 828 | ||
| 829 | @example | 829 | @example |
| 830 | @group | 830 | @group |
| 831 | (defvar x -99) ; @r{@code{x} receives an initial value of -99.} | 831 | (defvar x -99) ; @r{@code{x} receives an initial value of @minus{}99.} |
| 832 | 832 | ||
| 833 | (defun getx () | 833 | (defun getx () |
| 834 | x) ; @r{@code{x} is used ``free'' in this function.} | 834 | x) ; @r{@code{x} is used ``free'' in this function.} |
| @@ -838,7 +838,7 @@ following example: | |||
| 838 | @result{} 1 | 838 | @result{} 1 |
| 839 | 839 | ||
| 840 | ;; @r{After the @code{let} form finishes, @code{x} reverts to its} | 840 | ;; @r{After the @code{let} form finishes, @code{x} reverts to its} |
| 841 | ;; @r{previous value, which is -99.} | 841 | ;; @r{previous value, which is @minus{}99.} |
| 842 | 842 | ||
| 843 | (getx) | 843 | (getx) |
| 844 | @result{} -99 | 844 | @result{} -99 |
| @@ -852,14 +852,14 @@ that @code{defun} construct itself. When we call @code{getx} from | |||
| 852 | within a @code{let} form in which @code{x} is (dynamically) bound, it | 852 | within a @code{let} form in which @code{x} is (dynamically) bound, it |
| 853 | retrieves the local value (i.e., 1). But when we call @code{getx} | 853 | retrieves the local value (i.e., 1). But when we call @code{getx} |
| 854 | outside the @code{let} form, it retrieves the global value (i.e., | 854 | outside the @code{let} form, it retrieves the global value (i.e., |
| 855 | -99). | 855 | @minus{}99). |
| 856 | 856 | ||
| 857 | Here is another example, which illustrates setting a dynamically | 857 | Here is another example, which illustrates setting a dynamically |
| 858 | bound variable using @code{setq}: | 858 | bound variable using @code{setq}: |
| 859 | 859 | ||
| 860 | @example | 860 | @example |
| 861 | @group | 861 | @group |
| 862 | (defvar x -99) ; @r{@code{x} receives an initial value of -99.} | 862 | (defvar x -99) ; @r{@code{x} receives an initial value of @minus{}99.} |
| 863 | 863 | ||
| 864 | (defun addx () | 864 | (defun addx () |
| 865 | (setq x (1+ x))) ; @r{Add 1 to @code{x} and return its new value.} | 865 | (setq x (1+ x))) ; @r{Add 1 to @code{x} and return its new value.} |
| @@ -870,7 +870,7 @@ bound variable using @code{setq}: | |||
| 870 | @result{} 3 ; @r{The two @code{addx} calls add to @code{x} twice.} | 870 | @result{} 3 ; @r{The two @code{addx} calls add to @code{x} twice.} |
| 871 | 871 | ||
| 872 | ;; @r{After the @code{let} form finishes, @code{x} reverts to its} | 872 | ;; @r{After the @code{let} form finishes, @code{x} reverts to its} |
| 873 | ;; @r{previous value, which is -99.} | 873 | ;; @r{previous value, which is @minus{}99.} |
| 874 | 874 | ||
| 875 | (addx) | 875 | (addx) |
| 876 | @result{} -98 | 876 | @result{} -98 |
| @@ -1976,7 +1976,7 @@ will set them to @code{t}: | |||
| 1976 | This variable holds a list of all variables of type @code{DEFVAR_BOOL}. | 1976 | This variable holds a list of all variables of type @code{DEFVAR_BOOL}. |
| 1977 | @end defvar | 1977 | @end defvar |
| 1978 | 1978 | ||
| 1979 | Variables of type @code{DEFVAR_INT} can only take on integer values. | 1979 | Variables of type @code{DEFVAR_INT} can take on only integer values. |
| 1980 | Attempting to assign them any other value will result in an error: | 1980 | Attempting to assign them any other value will result in an error: |
| 1981 | 1981 | ||
| 1982 | @example | 1982 | @example |
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 3e1cd40c459..1b3fc377d61 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -2208,7 +2208,7 @@ adjust the window's height, use an entry whose @sc{car} is | |||
| 2208 | 2208 | ||
| 2209 | @item | 2209 | @item |
| 2210 | A number specifies the desired height of the new window. An integer | 2210 | A number specifies the desired height of the new window. An integer |
| 2211 | number specifies the number of lines of the window. A floating point | 2211 | specifies the number of lines of the window. A floating-point |
| 2212 | number gives the fraction of the window's height with respect to the | 2212 | number gives the fraction of the window's height with respect to the |
| 2213 | height of the frame's root window. | 2213 | height of the frame's root window. |
| 2214 | 2214 | ||
| @@ -2229,7 +2229,7 @@ To adjust the window's width, use an entry whose @sc{car} is | |||
| 2229 | 2229 | ||
| 2230 | @item | 2230 | @item |
| 2231 | A number specifies the desired width of the new window. An integer | 2231 | A number specifies the desired width of the new window. An integer |
| 2232 | number specifies the number of columns of the window. A floating point | 2232 | specifies the number of columns of the window. A floating-point |
| 2233 | number gives the fraction of the window's width with respect to the | 2233 | number gives the fraction of the window's width with respect to the |
| 2234 | width of the frame's root window. | 2234 | width of the frame's root window. |
| 2235 | 2235 | ||