+2014-03-18 Paul Eggert <eggert@cs.ucla.edu>
+
+ 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.
+
2014-03-16 Martin Rudalics <rudalics@gmx.at>
* display.texi (Temporary Displays): Rewrite descriptions of
If @var{seconds} is non-@code{nil}, it should be a number specifying
the maximum time to wait for input, in seconds. If no input arrives
within that time, @code{read-event} stops waiting and returns
-@code{nil}. A floating-point value for @var{seconds} means to wait
+@code{nil}. A floating point @var{seconds} means to wait
for a fractional number of seconds. Some systems support only a whole
number of seconds; on these systems, @var{seconds} is rounded down.
If @var{seconds} is @code{nil}, @code{read-event} waits as long as
@code{sit-for} waited the full time with no input arriving
(@pxref{Event Input Misc}). Otherwise, the value is @code{nil}.
-The argument @var{seconds} need not be an integer. If it is a floating
-point number, @code{sit-for} waits for a fractional number of seconds.
+The argument @var{seconds} need not be an integer. If it is floating
+point, @code{sit-for} waits for a fractional number of seconds.
Some systems support only a whole number of seconds; on these systems,
@var{seconds} is rounded down.
the display. It pays no attention to available input. It returns
@code{nil}.
-The argument @var{seconds} need not be an integer. If it is a floating
-point number, @code{sleep-for} waits for a fractional number of seconds.
+The argument @var{seconds} need not be an integer. If it is floating
+point, @code{sleep-for} waits for a fractional number of seconds.
Some systems support only a whole number of seconds; on these systems,
@var{seconds} is rounded down.
The value must be a number (floating point or integer).
@item float
-The value must be a floating point number.
+The value must be floating point.
@item string
The value must be a string. The customization buffer shows the string
@defopt echo-keystrokes
This variable determines how much time should elapse before command
-characters echo. Its value must be an integer or floating point number,
-which specifies the
+characters echo. Its value must be a number, and specifies the
number of seconds to wait before echoing. If the user types a prefix
key (such as @kbd{C-x}) and then delays this many seconds before
continuing, the prefix key is echoed in the echo area. (Once echoing
@table @code
@item priority
@kindex priority @r{(overlay property)}
-This property's value (which should be a non-negative integer number)
+This property's value (which should be a non-negative integer)
determines the priority of the overlay. No priority, or @code{nil},
means zero.
lines in a frame, using the @code{line-spacing} frame parameter
(@pxref{Layout Parameters}). However, if the default value of
@code{line-spacing} is non-@code{nil}, it overrides the
-frame's @code{line-spacing} parameter. An integer value specifies the
-number of pixels put below lines. A floating point number specifies
+frame's @code{line-spacing} parameter. An integer specifies the
+number of pixels put below lines. A floating-point number specifies
the spacing relative to the frame's default line height.
@vindex line-spacing
You can specify the line spacing for all lines in a buffer via the
-buffer-local @code{line-spacing} variable. An integer value specifies
-the number of pixels put below lines. A floating point number
+buffer-local @code{line-spacing} variable. An integer specifies
+the number of pixels put below lines. A floating-point number
specifies the spacing relative to the default frame line height. This
overrides line spacings specified for the frame.
The height of the font. In the simplest case, this is an integer in
units of 1/10 point.
-The value can also be a floating point number or a function, which
+The value can also be floating point or a function, which
specifies the height relative to an @dfn{underlying face}
-(@pxref{Displaying Faces}). If the value is a floating point number,
-that specifies the amount by which to scale the height of the
-underlying face. If the value is a function, that function is called
+(@pxref{Displaying Faces}). A floating-point value
+specifies the amount by which to scale the height of the
+underlying face. A function value is called
with one argument, the height of the underlying face, and returns the
height of the new face. If the function is passed an integer
argument, it must return an integer.
@item :size
The font size---either a non-negative integer that specifies the pixel
-size, or a floating point number that specifies the point size.
+size, or a floating-point number that specifies the point size.
@item :adstyle
Additional typographic style information for the font, such as
@table @code
@item :width @var{width}
-If @var{width} is an integer or floating point number, it specifies
+If @var{width} is a number, it specifies
that the space width should be @var{width} times the normal character
width. @var{width} can also be a @dfn{pixel width} specification
(@pxref{Pixel Specification}).
@table @code
@item :height @var{height}
Specifies the height of the space.
-If @var{height} is an integer or floating point number, it specifies
+If @var{height} is a number, it specifies
that the space height should be @var{height} times the normal character
height. The @var{height} may also be a @dfn{pixel height} specification
(@pxref{Pixel Specification}).
(a partial area) of the image to display. The elements @var{y} and
@var{x} specify the top left corner of the slice, within the image;
@var{width} and @var{height} specify the width and height of the
-slice. Integer values are numbers of pixels. A floating point number
+slice. Integers are numbers of pixels. A floating-point number
in the range 0.0--1.0 stands for that fraction of the width or height
of the entire image.
Otherwise, @var{slice} is a list @code{(@var{x} @var{y} @var{width}
@var{height})} which specifies the @var{x} and @var{y} positions and
@var{width} and @var{height} of the image area to insert. Integer
-values are in units of pixels. A floating point number in the range
+values are in units of pixels. A floating-point number in the range
0.0--1.0 stands for that fraction of the width or height of the entire
image.
larger than this limit.
If the value is an integer, it directly specifies the maximum
-image height and width, measured in pixels. If it is a floating
-point number, it specifies the maximum image height and width
+image height and width, measured in pixels. If it is floating
+point, it specifies the maximum image height and width
as a ratio to the frame height and width. If the value is
non-numeric, there is no explicit limit on the size of images.
Programming Types
* Integer Type:: Numbers without fractional parts.
-* Floating Point Type:: Numbers with fractional parts and with a large range.
+* Floating-Point Type:: Numbers with fractional parts and with a large range.
* Character Type:: The representation of letters, numbers and
control characters.
* Symbol Type:: A multi-use object that refers to a function,
* Comparison of Numbers:: Equality and inequality predicates.
* Numeric Conversions:: Converting float to integer and vice versa.
* Arithmetic Operations:: How to add, subtract, multiply and divide.
-* Rounding Operations:: Explicitly rounding floating point numbers.
+* Rounding Operations:: Explicitly rounding floating-point numbers.
* Bitwise Operations:: Logical and, or, not, shifting.
* Math Functions:: Trig, exponential and logarithmic functions.
* Random Numbers:: Obtaining random integers, predictable or not.
@item
The file's @acronym{UID}, normally as a string. However, if it does
-not correspond to a named user, the value is an integer or a floating
-point number.
+not correspond to a named user, the value is a number.
@item
The file's @acronym{GID}, likewise.
for the file, beyond the file's contents.
@item
-The size of the file in bytes. If the size is too large to fit in a
-Lisp integer, this is a floating point number.
+The size of the file in bytes. This is floating point if the size is
+too large to fit in a Lisp integer.
@item
The file's modes, as a string of ten letters or dashes,
@defun file-modes-symbolic-to-number modes &optional base-modes
This function converts a symbolic file mode specification in
-@var{modes} into the equivalent integer value. If the symbolic
+@var{modes} into the equivalent integer. If the symbolic
specification is based on an existing file, that file's mode bits are
taken from the optional argument @var{base-modes}; if that argument is
omitted or @code{nil}, it defaults to 0, i.e., no access rights at
@cindex gamma correction
If this is a number, Emacs performs ``gamma correction'' which adjusts
the brightness of all colors. The value should be the screen gamma of
-your display, a floating point number.
+your display.
Usual PC monitors have a screen gamma of 2.2, so color values in
Emacs, and in X windows generally, are calibrated to display properly
@item eql
Keys which are numbers are ``the same'' if they are @code{equal}, that
is, if they are equal in value and either both are integers or both
-are floating point numbers; otherwise, two distinct objects are never
+are floating point; otherwise, two distinct objects are never
``the same''.
@item eq
If @var{rehash-size} is an integer, it should be positive, and the hash
table grows by adding that much to the nominal size. If
-@var{rehash-size} is a floating point number, it had better be greater
+@var{rehash-size} is floating point, it had better be greater
than 1, and the hash table grows by multiplying the old size by that
number.
@item :rehash-threshold @var{threshold}
This specifies the criterion for when the hash table is ``full'' (so
it should be made larger). The value, @var{threshold}, should be a
-positive floating point number, no greater than 1. The hash table is
+positive floating-point number, no greater than 1. The hash table is
``full'' whenever the actual number of entries exceeds this fraction
of the nominal size. The default for @var{threshold} is 0.8.
@end table
The function @var{hash-fn} should accept one argument, a key, and return
an integer that is the ``hash code'' of that key. For good results, the
-function should use the whole range of integer values for hash codes,
+function should use the whole range of integers for hash codes,
including negative integers.
The specified functions are stored in the property list of @var{name}
@defvar gc-elapsed
This variable contains the total number of seconds of elapsed time
-during garbage collection so far in this Emacs session, as a floating
-point number.
+during garbage collection so far in this Emacs session, as a
+floating-point number.
@end defvar
@node Memory Usage
vectorlike or miscellaneous object. Each of these data types has the
corresponding tag value. All tags are enumerated by @code{enum Lisp_Type}
and placed into a 3-bit bitfield of the @code{Lisp_Object}. The rest of the
-bits is the value itself. Integer values are immediate, i.e., directly
+bits is the value itself. Integers are immediate, i.e., directly
represented by those @dfn{value bits}, and all other objects are represented
by the C pointers to a corresponding object allocated from the heap. Width
of the @code{Lisp_Object} is platform- and configuration-dependent: usually
Symbol, the unique-named entity commonly used as an identifier.
@item struct Lisp_Float
-Floating point value.
+Floating-point value.
@item union Lisp_Misc
Miscellaneous kinds of objects which don't fit into any of the above.
@item
Prefer the Emacs-defined type @code{printmax_t} for representing
-values that might be any signed integer value that can be printed,
+values that might be any signed integer that can be printed,
using a @code{printf}-family function.
@item
@defvar tool-bar-border
This variable specifies the height of the border drawn below the tool
-bar area. An integer value specifies height as a number of pixels.
+bar area. An integer specifies height as a number of pixels.
If the value is one of @code{internal-border-width} (the default) or
@code{border-width}, the tool bar border height corresponds to the
corresponding frame parameter.
numerically equal to @var{from}, @code{number-sequence} signals an
error, since those arguments specify an infinite sequence.
-All arguments can be integers or floating point numbers. However,
-floating point arguments can be tricky, because floating point
+All arguments are numbers.
+Floating-point arguments can be tricky, because floating-point
arithmetic is inexact. For instance, depending on the machine, it may
quite well happen that @code{(number-sequence 0.4 0.6 0.2)} returns
the one element list @code{(0.4)}, whereas
@defun memql object list
The function @code{memql} tests to see whether @var{object} is a member
of @var{list}, comparing members with @var{object} using @code{eql},
-so floating point elements are compared by value.
+so floating-point elements are compared by value.
If @var{object} is a member, @code{memql} returns a list starting with
its first occurrence in @var{list}. Otherwise, it returns @code{nil}.
Like @code{y-or-n-p}, except that if the user fails to answer within
@var{seconds} seconds, this function stops waiting and returns
@var{default}. It works by setting up a timer; see @ref{Timers}.
-The argument @var{seconds} may be an integer or a floating point number.
+The argument @var{seconds} should be a number.
@end defun
@defun yes-or-no-p prompt
@code{#x110000..#x3FFFFF}, which it uses for representing characters
that are not unified with Unicode and @dfn{raw 8-bit bytes} that
cannot be interpreted as characters. Thus, a character codepoint in
-Emacs is a 22-bit integer number.
+Emacs is a 22-bit integer.
@cindex internal representation of characters
@cindex characters, representation in buffers and strings
@defun multibyte-char-to-unibyte char
This converts the multibyte character @var{char} to a unibyte
character, and returns that character. If @var{char} is neither
-@acronym{ASCII} nor eight-bit, the function returns -1.
+@acronym{ASCII} nor eight-bit, the function returns @minus{}1.
@end defun
@defun unibyte-char-to-multibyte char
@item canonical-combining-class
Corresponds to the @code{Canonical_Combining_Class} Unicode property.
-The value is an integer number. For unassigned codepoints, the value
+The value is an integer. For unassigned codepoints, the value
is zero.
@cindex bidirectional class of characters
@item decimal-digit-value
Corresponds to the Unicode @code{Numeric_Value} property for
characters whose @code{Numeric_Type} is @samp{Decimal}. The value is
-an integer number. For unassigned codepoints, the value is
+an integer. For unassigned codepoints, the value is
@code{nil}, which means @acronym{NaN}, or ``not-a-number''.
@item digit-value
Corresponds to the Unicode @code{Numeric_Value} property for
characters whose @code{Numeric_Type} is @samp{Digit}. The value is an
-integer number. Examples of such characters include compatibility
+integer. Examples of such characters include compatibility
subscript and superscript digits, for which the value is the
corresponding number. For unassigned codepoints, the value is
@code{nil}, which means @acronym{NaN}.
@item numeric-value
Corresponds to the Unicode @code{Numeric_Value} property for
characters whose @code{Numeric_Type} is @samp{Numeric}. The value of
-this property is an integer or a floating-point number. Examples of
+this property is a number. Examples of
characters that have this property include fractions, subscripts,
superscripts, Roman numerals, currency numerators, and encircled
numbers. For example, the value of this property for the character
GNU Emacs supports two numeric data types: @dfn{integers} and
@dfn{floating point numbers}. Integers are whole numbers such as
-@minus{}3, 0, 7, 13, and 511. Their values are exact. Floating point
+@minus{}3, 0, 7, 13, and 511. Their values are exact. Floating-point
numbers are numbers with fractional parts, such as @minus{}4.5, 0.0, or
2.71828. They can also be expressed in exponential notation: 1.5e2
equals 150; in this example, @samp{e2} stands for ten to the second
* Comparison of Numbers:: Equality and inequality predicates.
* Numeric Conversions:: Converting float to integer and vice versa.
* Arithmetic Operations:: How to add, subtract, multiply and divide.
-* Rounding Operations:: Explicitly rounding floating point numbers.
+* Rounding Operations:: Explicitly rounding floating-point numbers.
* Bitwise Operations:: Logical and, or, not, shifting.
* Math Functions:: Trig, exponential and logarithmic functions.
* Random Numbers:: Obtaining random integers, predictable or not.
The range of values for an integer depends on the machine. The
minimum range is @minus{}536870912 to 536870911 (30 bits; i.e.,
@ifnottex
--2**29
+@minus{}2**29
@end ifnottex
@tex
@math{-2^{29}}
1111...111011 (30 bits total)
@end example
- In this implementation, the largest 30-bit binary integer value is
+ In this implementation, the largest 30-bit binary integer is
536,870,911 in decimal. In binary, it looks like this:
@example
give these arguments the name @var{number-or-marker}. When the argument
value is a marker, its position value is used and its buffer is ignored.
-@cindex largest Lisp integer number
-@cindex maximum Lisp integer number
+@cindex largest Lisp integer
+@cindex maximum Lisp integer
@defvar most-positive-fixnum
The value of this variable is the largest integer that Emacs Lisp
can handle.
@end defvar
-@cindex smallest Lisp integer number
-@cindex minimum Lisp integer number
+@cindex smallest Lisp integer
+@cindex minimum Lisp integer
@defvar most-negative-fixnum
The value of this variable is the smallest integer that Emacs Lisp can
handle. It is negative.
considered to be valid as a character. @xref{String Basics}.
@node Float Basics
-@section Floating Point Basics
+@section Floating-Point Basics
@cindex @acronym{IEEE} floating point
- Floating point numbers are useful for representing numbers that are
-not integral. The precise range of floating point numbers is
+ Floating-point numbers are useful for representing numbers that are
+not integral. The precise range of floating-point numbers is
machine-specific; it is the same as the range of the C data type
@code{double} on the machine you are using. Emacs uses the
-@acronym{IEEE} floating point standard, which is supported by all
+@acronym{IEEE} floating-point standard, which is supported by all
modern computers.
- The read syntax for floating point numbers requires either a decimal
+ The read syntax for floating-point numbers requires either a decimal
point (with at least one digit following), an exponent, or both. For
example, @samp{1500.0}, @samp{15e2}, @samp{15.0e2}, @samp{1.5e3}, and
-@samp{.15e4} are five ways of writing a floating point number whose
+@samp{.15e4} are five ways of writing a floating-point number whose
value is 1500. They are all equivalent. You can also use a minus
-sign to write negative floating point numbers, as in @samp{-1.0}.
+sign to write negative floating-point numbers, as in @samp{-1.0}.
- Emacs Lisp treats @code{-0.0} as equal to ordinary zero (with
+ Emacs Lisp treats @code{-0.0} as numerically equal to ordinary zero (with
respect to @code{equal} and @code{=}), even though the two are
-distinguishable in the @acronym{IEEE} floating point standard.
+distinguishable in the @acronym{IEEE} floating-point standard.
@cindex positive infinity
@cindex negative infinity
@cindex infinity
@cindex NaN
- The @acronym{IEEE} floating point standard supports positive
-infinity and negative infinity as floating point values. It also
+ The @acronym{IEEE} floating-point standard supports positive
+infinity and negative infinity as floating-point values. It also
provides for a class of values called NaN or ``not-a-number'';
numerical functions return such values in cases where there is no
correct answer. For example, @code{(/ 0.0 0.0)} returns a NaN@. (NaN
non-@acronym{IEEE} platforms it returns an implementation-defined
value.
-Here are the read syntaxes for these special floating point values:
+Here are the read syntaxes for these special floating-point values:
@table @asis
@item positive infinity
@code{number-or-marker-p}, in @ref{Predicates on Markers}.
@defun floatp object
-This predicate tests whether its argument is a floating point
-number and returns @code{t} if so, @code{nil} otherwise.
+This predicate tests whether its argument is floating point
+and returns @code{t} if so, @code{nil} otherwise.
@end defun
@defun integerp object
@cindex comparing numbers
To test numbers for numerical equality, you should normally use
-@code{=}, not @code{eq}. There can be many distinct floating point
-number objects with the same numeric value. If you use @code{eq} to
+@code{=}, not @code{eq}. There can be many distinct floating-point
+objects with the same numeric value. If you use @code{eq} to
compare them, then you test whether two values are the same
@emph{object}. By contrast, @code{=} compares only the numeric values
of the objects.
- In Emacs Lisp, each integer value is a unique Lisp object.
+ In Emacs Lisp, each integer is a unique Lisp object.
Therefore, @code{eq} is equivalent to @code{=} where integers are
concerned. It is sometimes convenient to use @code{eq} for comparing
an unknown value with an integer, because @code{eq} does not report an
Sometimes it is useful to compare numbers with @code{equal}, which
treats two numbers as equal if they have the same data type (both
integers, or both floating point) and the same value. By contrast,
-@code{=} can treat an integer and a floating point number as equal.
+@code{=} can treat an integer and a floating-point number as equal.
@xref{Equality Predicates}.
- There is another wrinkle: because floating point arithmetic is not
-exact, it is often a bad idea to check for equality of two floating
-point values. Usually it is better to test for approximate equality.
+ There is another wrinkle: because floating-point arithmetic is not
+exact, it is often a bad idea to check for equality of floating-point
+values. Usually it is better to test for approximate equality.
Here's a function to do this:
@example
@code{=} because Common Lisp implements multi-word integers, and two
distinct integer objects can have the same numeric value. Emacs Lisp
can have just one integer object for any given value because it has a
-limited range of integer values.
+limited range of integers.
@end quotation
@defun = number-or-marker &rest number-or-markers
@defun max number-or-marker &rest numbers-or-markers
This function returns the largest of its arguments.
-If any of the arguments is floating-point, the value is returned
+If any of the arguments is floating point, the value is returned
as floating point, even if it was given as an integer.
@example
@defun min number-or-marker &rest numbers-or-markers
This function returns the smallest of its arguments.
-If any of the arguments is floating-point, the value is returned
+If any of the arguments is floating point, the value is returned
as floating point, even if it was given as an integer.
@example
@defun float number
This returns @var{number} converted to floating point.
-If @var{number} is already a floating point number, @code{float} returns
+If @var{number} is already floating point, @code{float} returns
it unchanged.
@end defun
- There are four functions to convert floating point numbers to
+ There are four functions to convert floating-point numbers to
integers; they differ in how they round. All accept an argument
@var{number} and an optional argument @var{divisor}. Both arguments
-may be integers or floating point numbers. @var{divisor} may also be
+may be integers or floating-point numbers. @var{divisor} may also be
@code{nil}. If @var{divisor} is @code{nil} or omitted, these
functions convert @var{number} to an integer, or return it unchanged
if it already is an integer. If @var{divisor} is non-@code{nil}, they
divide @var{number} by @var{divisor} and convert the result to an
integer. If @var{divisor} is zero (whether integer or
-floating-point), Emacs signals an @code{arith-error} error.
+floating point), Emacs signals an @code{arith-error} error.
@defun truncate number &optional divisor
This returns @var{number}, converted to an integer by rounding towards
(addition, subtraction, multiplication, and division), as well as
remainder and modulus functions, and functions to add or subtract 1.
Except for @code{%}, each of these functions accepts both integer and
-floating point arguments, and returns a floating point number if any
-argument is a floating point number.
+floating-point arguments, and returns a floating-point number if any
+argument is floating point.
It is important to note that in Emacs Lisp, arithmetic functions
do not check for overflow. Thus @code{(1+ 536870911)} may evaluate to
@cindex @code{arith-error} in division
If you divide an integer by the integer 0, Emacs signals an
-@code{arith-error} error (@pxref{Errors}). If you divide a floating
-point number by 0, or divide by the floating point number 0.0, the
-result is either positive or negative infinity (@pxref{Float Basics}).
+@code{arith-error} error (@pxref{Errors}). Floating-point division of
+a nonzero number by zero yields either positive or negative infinity
+(@pxref{Float Basics}).
@end defun
@defun % dividend divisor
by @var{divisor}, but with the same sign as @var{divisor}.
The arguments must be numbers or markers.
-Unlike @code{%}, @code{mod} permits floating point arguments; it
+Unlike @code{%}, @code{mod} permits floating-point arguments; it
rounds the quotient downward (towards minus infinity) to an integer,
and uses that quotient to compute the remainder.
@cindex rounding without conversion
The functions @code{ffloor}, @code{fceiling}, @code{fround}, and
-@code{ftruncate} take a floating point argument and return a floating
-point result whose value is a nearby integer. @code{ffloor} returns the
+@code{ftruncate} take a floating-point argument and return a floating-point
+result whose value is a nearby integer. @code{ffloor} returns the
nearest integer below; @code{fceiling}, the nearest integer above;
@code{ftruncate}, the nearest integer in the direction towards zero;
@code{fround}, the nearest integer.
@defun ffloor float
This function rounds @var{float} to the next lower integral value, and
-returns that value as a floating point number.
+returns that value as a floating-point number.
@end defun
@defun fceiling float
This function rounds @var{float} to the next higher integral value, and
-returns that value as a floating point number.
+returns that value as a floating-point number.
@end defun
@defun ftruncate float
This function rounds @var{float} towards zero to an integral value, and
-returns that value as a floating point number.
+returns that value as a floating-point number.
@end defun
@defun fround float
This function rounds @var{float} to the nearest integral value,
-and returns that value as a floating point number.
+and returns that value as a floating-point number.
@end defun
@node Bitwise Operations
@cindex mathematical functions
@cindex floating-point functions
- These mathematical functions allow integers as well as floating point
+ These mathematical functions allow integers as well as floating-point
numbers as arguments.
@defun sin arg
@menu
* Integer Type:: Numbers without fractional parts.
-* Floating Point Type:: Numbers with fractional parts and with a large range.
+* Floating-Point Type:: Numbers with fractional parts and with a large range.
* Character Type:: The representation of letters, numbers and
control characters.
* Symbol Type:: A multi-use object that refers to a function,
The range of values for integers in Emacs Lisp is @minus{}536870912 to
536870911 (30 bits; i.e.,
@ifnottex
--2**29
+@minus{}2**29
@end ifnottex
@tex
@math{-2^{29}}
@example
@group
--1 ; @r{The integer -1.}
+-1 ; @r{The integer @minus{}1.}
1 ; @r{The integer 1.}
1. ; @r{Also the integer 1.}
+1 ; @r{Also the integer 1.}
@noindent
As a special exception, if a sequence of digits specifies an integer
too large or too small to be a valid integer object, the Lisp reader
-reads it as a floating-point number (@pxref{Floating Point Type}).
+reads it as a floating-point number (@pxref{Floating-Point Type}).
For instance, if Emacs integers are 30 bits, @code{536870912} is read
as the floating-point number @code{536870912.0}.
@xref{Numbers}, for more information.
-@node Floating Point Type
-@subsection Floating Point Type
+@node Floating-Point Type
+@subsection Floating-Point Type
- Floating point numbers are the computer equivalent of scientific
-notation; you can think of a floating point number as a fraction
+ Floating-point numbers are the computer equivalent of scientific
+notation; you can think of a floating-point number as a fraction
together with a power of ten. The precise number of significant
figures and the range of possible exponents is machine-specific; Emacs
uses the C data type @code{double} to store the value, and internally
this records a power of 2 rather than a power of 10.
- The printed representation for floating point numbers requires either
+ The printed representation for floating-point numbers requires either
a decimal point (with at least one digit following), an exponent, or
both. For example, @samp{1500.0}, @samp{15e2}, @samp{15.0e2},
-@samp{1.5e3}, and @samp{.15e4} are five ways of writing a floating point
+@samp{1.5e3}, and @samp{.15e4} are five ways of writing a floating-point
number whose value is 1500. They are all equivalent.
@xref{Numbers}, for more information.
By default, the values are integers that are 100 times the system load
averages, but if @var{use-float} is non-@code{nil}, then they are
-returned as floating point numbers without multiplying by 100.
+returned as floating-point numbers without multiplying by 100.
If it is impossible to obtain the load average, this function signals
an error. On some platforms, access to load averages requires
@cindex UID
@defun user-real-uid
This function returns the real @acronym{UID} of the user.
-The value may be a floating point number, in the (unlikely) event that
+The value may be floating point, in the (unlikely) event that
the UID is too large to fit in a Lisp integer.
@end defun
@defun user-uid
This function returns the effective @acronym{UID} of the user.
-The value may be a floating point number.
+The value may be floating point.
@end defun
@cindex GID
@defun group-gid
This function returns the effective @acronym{GID} of the Emacs process.
-The value may be a floating point number.
+The value may be floating point.
@end defun
@defun group-real-gid
This function returns the real @acronym{GID} of the Emacs process.
-The value may be a floating point number.
+The value may be floating point.
@end defun
@defun system-users
integers, @code{(@var{sec-high} @var{sec-low} @var{microsec})}, or of
two integers, @code{(@var{sec-high} @var{sec-low})}. The integers
@var{sec-high} and @var{sec-low} give the high and low bits of an
-integer number of seconds. This integer number,
+integer number of seconds. This integer,
@ifnottex
@var{high} * 2**16 + @var{low},
@end ifnottex
@end defun
@defun seconds-to-time seconds
-This function converts @var{seconds}, a floating point number of
-seconds since the epoch, to a time value and returns that. To perform
-the inverse conversion, use @code{float-time} (@pxref{Time of Day}).
+This function converts @var{seconds}, the number of seconds since the
+epoch, to a time value and returns that. To convert back, use
+@code{float-time} (@pxref{Time of Day}).
@end defun
@defun format-seconds format-string seconds
@deffn Command run-with-idle-timer secs repeat function &rest args
Set up a timer which runs the next time Emacs is idle for @var{secs}
-seconds. The value of @var{secs} may be an integer or a floating
-point number; a value of the type returned by @code{current-idle-time}
-is also allowed.
+seconds. The value of @var{secs} may be a number or a value of the type
+returned by @code{current-idle-time}.
If @var{repeat} is @code{nil}, the timer runs just once, the first time
Emacs remains idle for a long enough time. More often @var{repeat} is
. @var{symbol})}, where @var{code} is the numeric keysym code (not
including the ``vendor specific'' bit,
@ifnottex
--2**28),
+@minus{}2**28),
@end ifnottex
@tex
$-2^{28}$),
For example @code{(168 . mute-acute)} defines a system-specific key (used
by HP X servers) whose numeric code is
@ifnottex
--2**28
+@minus{}2**28
@end ifnottex
@tex
$-2^{28}$
@item :timeout @var{timeout}
The timeout time in milliseconds since the display of the notification
-at which the notification should automatically close. If -1, the
+at which the notification should automatically close. If @minus{}1, the
notification's expiration time is dependent on the notification
server's settings, and may vary for the type of notification. If 0,
-the notification never expires. Default value is -1.
+the notification never expires. Default value is @minus{}1.
@item :urgency @var{urgency}
The urgency level. It can be @code{low}, @code{normal}, or @code{critical}.
subprocess output.
The argument @var{millisec} is obsolete (and should not be used),
-because @var{seconds} can be a floating point number to specify
+because @var{seconds} can be floating point to specify
waiting a fractional number of seconds. If @var{seconds} is 0, the
function accepts whatever output is pending but does not wait.
attribute @var{key}s that this function can return are listed below.
Not all platforms support all of these attributes; if an attribute is
not supported, its association will not appear in the returned alist.
-Values that are numbers can be either integer or floating-point,
+Values that are numbers can be either integer or floating point,
depending on the magnitude of the value.
@table @code
@end defvar
@defvar float-output-format
-This variable specifies how to print floating point numbers. The
+This variable specifies how to print floating-point numbers. The
default is @code{nil}, meaning use the shortest output
that represents the number without losing information.
@cindex integer to string
@cindex integer to decimal
This function returns a string consisting of the printed base-ten
-representation of @var{number}, which may be an integer or a floating
-point number. The returned value starts with a minus sign if the argument is
-negative.
+representation of @var{number}. The returned value starts with a
+minus sign if the argument is negative.
@example
(number-to-string 256)
This function returns the numeric value of the characters in
@var{string}. If @var{base} is non-@code{nil}, it must be an integer
between 2 and 16 (inclusive), and integers are converted in that base.
-If @var{base} is @code{nil}, then base ten is used. Floating point
+If @var{base} is @code{nil}, then base ten is used. Floating-point
conversion only works in base ten; we have not implemented other
-radices for floating point numbers, because that would be much more
+radices for floating-point numbers, because that would be much more
work and does not seem useful. If @var{string} looks like an integer
but its value is too large to fit into a Lisp integer,
-@code{string-to-number} returns a floating point result.
+@code{string-to-number} returns a floating-point result.
The parsing skips spaces and tabs at the beginning of @var{string},
then reads as much of @var{string} as it can interpret as a number in
Replace the specification with the character which is the value given.
@item %e
-Replace the specification with the exponential notation for a floating
-point number.
+Replace the specification with the exponential notation for a
+floating-point number.
@item %f
-Replace the specification with the decimal-point notation for a floating
-point number.
+Replace the specification with the decimal-point notation for a
+floating-point number.
@item %g
-Replace the specification with notation for a floating point number,
+Replace the specification with notation for a floating-point number,
using either exponential notation or decimal-point notation, whichever
is shorter.
position. You can place the cursor on any desired character of these
strings by giving that character a non-@code{nil} @code{cursor} text
property. In addition, if the value of the @code{cursor} property is
-an integer number, it specifies the number of buffer's character
+an integer, it specifies the number of buffer's character
positions, starting with the position where the overlay or the
@code{display} property begins, for which the cursor should be
displayed on that character. Specifically, if the value of the
In other words, the string character with the @code{cursor} property
of any non-@code{nil} value is the character where to display the
cursor. The value of the property says for which buffer positions to
-display the cursor there. If the value is an integer number @var{n},
+display the cursor there. If the value is an integer @var{n},
the cursor is displayed there when point is anywhere between the
beginning of the overlay or @code{display} property and @var{n}
positions after that. If the value is anything else and
@example
@group
-(defvar x -99) ; @r{@code{x} receives an initial value of -99.}
+(defvar x -99) ; @r{@code{x} receives an initial value of @minus{}99.}
(defun getx ()
x) ; @r{@code{x} is used ``free'' in this function.}
@result{} 1
;; @r{After the @code{let} form finishes, @code{x} reverts to its}
-;; @r{previous value, which is -99.}
+;; @r{previous value, which is @minus{}99.}
(getx)
@result{} -99
within a @code{let} form in which @code{x} is (dynamically) bound, it
retrieves the local value (i.e., 1). But when we call @code{getx}
outside the @code{let} form, it retrieves the global value (i.e.,
--99).
+@minus{}99).
Here is another example, which illustrates setting a dynamically
bound variable using @code{setq}:
@example
@group
-(defvar x -99) ; @r{@code{x} receives an initial value of -99.}
+(defvar x -99) ; @r{@code{x} receives an initial value of @minus{}99.}
(defun addx ()
(setq x (1+ x))) ; @r{Add 1 to @code{x} and return its new value.}
@result{} 3 ; @r{The two @code{addx} calls add to @code{x} twice.}
;; @r{After the @code{let} form finishes, @code{x} reverts to its}
-;; @r{previous value, which is -99.}
+;; @r{previous value, which is @minus{}99.}
(addx)
@result{} -98
This variable holds a list of all variables of type @code{DEFVAR_BOOL}.
@end defvar
- Variables of type @code{DEFVAR_INT} can only take on integer values.
+ Variables of type @code{DEFVAR_INT} can take on only integer values.
Attempting to assign them any other value will result in an error:
@example
@item
A number specifies the desired height of the new window. An integer
-number specifies the number of lines of the window. A floating point
+specifies the number of lines of the window. A floating-point
number gives the fraction of the window's height with respect to the
height of the frame's root window.
@item
A number specifies the desired width of the new window. An integer
-number specifies the number of columns of the window. A floating point
+specifies the number of columns of the window. A floating-point
number gives the fraction of the window's width with respect to the
width of the frame's root window.