Skip to content

Commit 1a0c7b9

Browse files
gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907)
1 parent 420d943 commit 1a0c7b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+241
-241
lines changed

Doc/c-api/arg.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,10 @@ Numbers
280280
length 1, to a C :c:expr:`int`.
281281

282282
``f`` (:class:`float`) [float]
283-
Convert a Python floating point number to a C :c:expr:`float`.
283+
Convert a Python floating-point number to a C :c:expr:`float`.
284284

285285
``d`` (:class:`float`) [double]
286-
Convert a Python floating point number to a C :c:expr:`double`.
286+
Convert a Python floating-point number to a C :c:expr:`double`.
287287

288288
``D`` (:class:`complex`) [Py_complex]
289289
Convert a Python complex number to a C :c:type:`Py_complex` structure.
@@ -642,10 +642,10 @@ Building values
642642
object of length 1.
643643
644644
``d`` (:class:`float`) [double]
645-
Convert a C :c:expr:`double` to a Python floating point number.
645+
Convert a C :c:expr:`double` to a Python floating-point number.
646646
647647
``f`` (:class:`float`) [float]
648-
Convert a C :c:expr:`float` to a Python floating point number.
648+
Convert a C :c:expr:`float` to a Python floating-point number.
649649
650650
``D`` (:class:`complex`) [Py_complex \*]
651651
Convert a C :c:type:`Py_complex` structure to a Python complex number.

Doc/c-api/float.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22

33
.. _floatobjects:
44

5-
Floating Point Objects
5+
Floating-Point Objects
66
======================
77

8-
.. index:: pair: object; floating point
8+
.. index:: pair: object; floating-point
99

1010

1111
.. c:type:: PyFloatObject
1212
13-
This subtype of :c:type:`PyObject` represents a Python floating point object.
13+
This subtype of :c:type:`PyObject` represents a Python floating-point object.
1414

1515

1616
.. c:var:: PyTypeObject PyFloat_Type
1717
18-
This instance of :c:type:`PyTypeObject` represents the Python floating point
18+
This instance of :c:type:`PyTypeObject` represents the Python floating-point
1919
type. This is the same object as :class:`float` in the Python layer.
2020

2121

@@ -45,7 +45,7 @@ Floating Point Objects
4545
.. c:function:: double PyFloat_AsDouble(PyObject *pyfloat)
4646
4747
Return a C :c:expr:`double` representation of the contents of *pyfloat*. If
48-
*pyfloat* is not a Python floating point object but has a :meth:`~object.__float__`
48+
*pyfloat* is not a Python floating-point object but has a :meth:`~object.__float__`
4949
method, this method will first be called to convert *pyfloat* into a float.
5050
If :meth:`!__float__` is not defined then it falls back to :meth:`~object.__index__`.
5151
This method returns ``-1.0`` upon failure, so one should call

Doc/c-api/marshal.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Numeric values are stored with the least significant byte first.
1515

1616
The module supports two versions of the data format: version 0 is the
1717
historical version, version 1 shares interned strings in the file, and upon
18-
unmarshalling. Version 2 uses a binary format for floating point numbers.
18+
unmarshalling. Version 2 uses a binary format for floating-point numbers.
1919
``Py_MARSHAL_VERSION`` indicates the current file format (currently 2).
2020

2121

Doc/c-api/number.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ Number Protocol
5151
5252
Return a reasonable approximation for the mathematical value of *o1* divided by
5353
*o2*, or ``NULL`` on failure. The return value is "approximate" because binary
54-
floating point numbers are approximate; it is not possible to represent all real
55-
numbers in base two. This function can return a floating point value when
54+
floating-point numbers are approximate; it is not possible to represent all real
55+
numbers in base two. This function can return a floating-point value when
5656
passed two integers. This is the equivalent of the Python expression ``o1 / o2``.
5757
5858
@@ -177,8 +177,8 @@ Number Protocol
177177
178178
Return a reasonable approximation for the mathematical value of *o1* divided by
179179
*o2*, or ``NULL`` on failure. The return value is "approximate" because binary
180-
floating point numbers are approximate; it is not possible to represent all real
181-
numbers in base two. This function can return a floating point value when
180+
floating-point numbers are approximate; it is not possible to represent all real
181+
numbers in base two. This function can return a floating-point value when
182182
passed two integers. The operation is done *in-place* when *o1* supports it.
183183
This is the equivalent of the Python statement ``o1 /= o2``.
184184

Doc/faq/design.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ operations. This means that as far as floating-point operations are concerned,
7070
Python behaves like many popular languages including C and Java.
7171

7272
Many numbers that can be written easily in decimal notation cannot be expressed
73-
exactly in binary floating-point. For example, after::
73+
exactly in binary floating point. For example, after::
7474

7575
>>> x = 1.2
7676

@@ -87,7 +87,7 @@ which is exactly::
8787
The typical precision of 53 bits provides Python floats with 15--16
8888
decimal digits of accuracy.
8989

90-
For a fuller explanation, please see the :ref:`floating point arithmetic
90+
For a fuller explanation, please see the :ref:`floating-point arithmetic
9191
<tut-fp-issues>` chapter in the Python tutorial.
9292

9393

Doc/faq/library.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,12 +718,12 @@ is simple::
718718
import random
719719
random.random()
720720
721-
This returns a random floating point number in the range [0, 1).
721+
This returns a random floating-point number in the range [0, 1).
722722
723723
There are also many other specialized generators in this module, such as:
724724
725725
* ``randrange(a, b)`` chooses an integer in the range [a, b).
726-
* ``uniform(a, b)`` chooses a floating point number in the range [a, b).
726+
* ``uniform(a, b)`` chooses a floating-point number in the range [a, b).
727727
* ``normalvariate(mean, sdev)`` samples the normal (Gaussian) distribution.
728728
729729
Some higher-level functions operate on sequences directly, such as:

Doc/faq/programming.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ How do I convert a string to a number?
869869
--------------------------------------
870870

871871
For integers, use the built-in :func:`int` type constructor, e.g. ``int('144')
872-
== 144``. Similarly, :func:`float` converts to floating-point,
872+
== 144``. Similarly, :func:`float` converts to a floating-point number,
873873
e.g. ``float('144') == 144.0``.
874874

875875
By default, these interpret the number as decimal, so that ``int('0144') ==

Doc/library/array.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
--------------
1010

1111
This module defines an object type which can compactly represent an array of
12-
basic values: characters, integers, floating point numbers. Arrays are sequence
12+
basic values: characters, integers, floating-point numbers. Arrays are sequence
1313
types and behave very much like lists, except that the type of objects stored in
1414
them is constrained. The type is specified at object creation time by using a
1515
:dfn:`type code`, which is a single character. The following type codes are
@@ -263,7 +263,7 @@ The string representation is guaranteed to be able to be converted back to an
263263
array with the same type and value using :func:`eval`, so long as the
264264
:class:`~array.array` class has been imported using ``from array import array``.
265265
Variables ``inf`` and ``nan`` must also be defined if it contains
266-
corresponding floating point values.
266+
corresponding floating-point values.
267267
Examples::
268268

269269
array('l')

Doc/library/colorsys.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The :mod:`colorsys` module defines bidirectional conversions of color values
1414
between colors expressed in the RGB (Red Green Blue) color space used in
1515
computer monitors and three other coordinate systems: YIQ, HLS (Hue Lightness
1616
Saturation) and HSV (Hue Saturation Value). Coordinates in all of these color
17-
spaces are floating point values. In the YIQ space, the Y coordinate is between
17+
spaces are floating-point values. In the YIQ space, the Y coordinate is between
1818
0 and 1, but the I and Q coordinates can be positive or negative. In all other
1919
spaces, the coordinates are all between 0 and 1.
2020

Doc/library/configparser.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ ConfigParser Objects
11831183
.. method:: getfloat(section, option, *, raw=False, vars=None[, fallback])
11841184

11851185
A convenience method which coerces the *option* in the specified *section*
1186-
to a floating point number. See :meth:`get` for explanation of *raw*,
1186+
to a floating-point number. See :meth:`get` for explanation of *raw*,
11871187
*vars* and *fallback*.
11881188

11891189

0 commit comments

Comments
 (0)