Commit 09b73f08 authored by Paul Eggert's avatar Paul Eggert

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.
parent 07f44fdb
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
......
......@@ -2471,7 +2471,7 @@ displayed there. Otherwise @code{read-event} does not move the cursor.
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
......@@ -2915,8 +2915,8 @@ time to read text that you display. The value is @code{t} if
@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.
......@@ -2942,8 +2942,8 @@ This function simply pauses for @var{seconds} seconds without updating
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.
......
......@@ -571,7 +571,7 @@ The value must be an integer.
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
......
......@@ -554,8 +554,7 @@ This normal hook is run whenever the echo area is cleared---either by
@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
......@@ -1508,7 +1507,7 @@ of them:
@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.
......@@ -1949,14 +1948,14 @@ parts of Emacs text.
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.
......@@ -2070,11 +2069,11 @@ Relative character width. This should be one of the symbols
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.
......@@ -3320,7 +3319,7 @@ These have the same meanings as the face attributes of the same name.
@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
......@@ -4104,7 +4103,7 @@ can use in @var{props} to specify the weight of the space:
@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}).
......@@ -4128,7 +4127,7 @@ also specify the height of the space, with these properties:
@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}).
......@@ -4251,7 +4250,7 @@ This specification together with @code{image} specifies a @dfn{slice}
(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.
......@@ -5072,7 +5071,7 @@ The argument @var{slice} specifies a slice of the image to insert. If
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.
......@@ -5143,8 +5142,8 @@ will load. Emacs will refuse to load (and display) any image that is
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.
......
......@@ -296,7 +296,7 @@ Lisp Data Types
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,
......@@ -361,7 +361,7 @@ Numbers
* 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.
......
......@@ -1162,8 +1162,7 @@ links, can be created by using the @code{add-name-to-file} function
@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.
......@@ -1187,8 +1186,8 @@ its owner and group, and other information recorded in the filesystem
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,
......@@ -1679,7 +1678,7 @@ specifications.
@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
......
......@@ -998,7 +998,7 @@ used instead.
@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
......
......@@ -73,7 +73,7 @@ alternatives:
@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
......@@ -134,7 +134,7 @@ larger, at that time.
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.
......@@ -143,7 +143,7 @@ The default value is 1.5.
@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
......@@ -266,7 +266,7 @@ return non-@code{nil} if they are considered ``the same''.
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}
......
......@@ -517,8 +517,8 @@ done so far in this Emacs session.
@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
......@@ -917,7 +917,7 @@ following basic data types: integer, symbol, string, cons cell, float,
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
......@@ -945,7 +945,7 @@ Array, a fixed-size set of Lisp objects which may be accessed by an index.
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.
......@@ -1606,7 +1606,7 @@ although @code{off_t} is always signed, @code{time_t} need not be.
@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
......
......@@ -2760,7 +2760,7 @@ The value is an integer, a number of pixels. The default is 1.
@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.
......
......@@ -646,8 +646,8 @@ If @var{separation} is 0 and @var{to} is neither @code{nil} nor
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
......@@ -1405,7 +1405,7 @@ sample-list
@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}.
......
......@@ -1967,7 +1967,7 @@ appears on the screen at a time.
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
......
......@@ -50,7 +50,7 @@ inclusive. Emacs extends this range with codepoints in the range
@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
......@@ -259,7 +259,7 @@ character data, @var{character}. It signals an error if
@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
......@@ -451,7 +451,7 @@ is @code{Cn}.
@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
......@@ -479,13 +479,13 @@ unassigned codepoints, the value is the character itself.
@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}.
......@@ -493,7 +493,7 @@ corresponding number. For unassigned codepoints, the value is
@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
......
......@@ -10,7 +10,7 @@
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
......@@ -24,7 +24,7 @@ exact; they have a fixed, limited amount of precision.
* 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.
......@@ -36,7 +36,7 @@ exact; they have a fixed, limited amount of precision.
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}}
......@@ -122,7 +122,7 @@ complement} notation.)
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
......@@ -145,15 +145,15 @@ arguments to such functions may be either numbers or markers, we often
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.
......@@ -164,33 +164,33 @@ integer between zero and the value of @code{max-char}, inclusive, is
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
......@@ -204,7 +204,7 @@ example, @code{(log -1.0)} typically returns a NaN, but on
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
......@@ -272,8 +272,8 @@ its argument. See also @code{integer-or-marker-p} and
@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
......@@ -310,13 +310,13 @@ if so, @code{nil} otherwise. The argument must be a number.
@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
......@@ -328,12 +328,12 @@ use @code{=} if you can, even for comparing integers.
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
......@@ -351,7 +351,7 @@ Here's a function to do this:
@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
......@@ -397,7 +397,7 @@ otherwise.
@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
......@@ -412,7 +412,7 @@ as floating point, even if it was given as an integer.
@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
......@@ -435,20 +435,20 @@ To convert an integer to floating point, use the function @code{float}.
@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
......@@ -529,8 +529,8 @@ depending on your machine.
(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
......@@ -659,9 +659,9 @@ does not happen in practice.)
@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
......@@ -701,7 +701,7 @@ in other words, the remainder after division of @var{dividend}
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.
......@@ -751,30 +751,30 @@ Conversions}.
@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
......@@ -1083,7 +1083,7 @@ bit is one in the result if, and only if, the @var{n}th bit is zero in
@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
......
......@@ -136,7 +136,7 @@ latter are unique to Emacs Lisp.
@menu
* Integer Type:: Numbers without fractional parts.