mirror of
https://github.com/python/cpython.git
synced 2025-08-18 15:51:23 +00:00
[3.13] gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) (GH-122012)
(cherry picked from commit 1a0c7b9ba4
)
This commit is contained in:
parent
225cbee8d8
commit
a45d9051ed
100 changed files with 238 additions and 238 deletions
|
@ -280,10 +280,10 @@ Numbers
|
|||
length 1, to a C :c:expr:`int`.
|
||||
|
||||
``f`` (:class:`float`) [float]
|
||||
Convert a Python floating point number to a C :c:expr:`float`.
|
||||
Convert a Python floating-point number to a C :c:expr:`float`.
|
||||
|
||||
``d`` (:class:`float`) [double]
|
||||
Convert a Python floating point number to a C :c:expr:`double`.
|
||||
Convert a Python floating-point number to a C :c:expr:`double`.
|
||||
|
||||
``D`` (:class:`complex`) [Py_complex]
|
||||
Convert a Python complex number to a C :c:type:`Py_complex` structure.
|
||||
|
@ -642,10 +642,10 @@ Building values
|
|||
object of length 1.
|
||||
|
||||
``d`` (:class:`float`) [double]
|
||||
Convert a C :c:expr:`double` to a Python floating point number.
|
||||
Convert a C :c:expr:`double` to a Python floating-point number.
|
||||
|
||||
``f`` (:class:`float`) [float]
|
||||
Convert a C :c:expr:`float` to a Python floating point number.
|
||||
Convert a C :c:expr:`float` to a Python floating-point number.
|
||||
|
||||
``D`` (:class:`complex`) [Py_complex \*]
|
||||
Convert a C :c:type:`Py_complex` structure to a Python complex number.
|
||||
|
|
|
@ -2,20 +2,20 @@
|
|||
|
||||
.. _floatobjects:
|
||||
|
||||
Floating Point Objects
|
||||
Floating-Point Objects
|
||||
======================
|
||||
|
||||
.. index:: pair: object; floating point
|
||||
.. index:: pair: object; floating-point
|
||||
|
||||
|
||||
.. c:type:: PyFloatObject
|
||||
|
||||
This subtype of :c:type:`PyObject` represents a Python floating point object.
|
||||
This subtype of :c:type:`PyObject` represents a Python floating-point object.
|
||||
|
||||
|
||||
.. c:var:: PyTypeObject PyFloat_Type
|
||||
|
||||
This instance of :c:type:`PyTypeObject` represents the Python floating point
|
||||
This instance of :c:type:`PyTypeObject` represents the Python floating-point
|
||||
type. This is the same object as :class:`float` in the Python layer.
|
||||
|
||||
|
||||
|
@ -45,7 +45,7 @@ Floating Point Objects
|
|||
.. c:function:: double PyFloat_AsDouble(PyObject *pyfloat)
|
||||
|
||||
Return a C :c:expr:`double` representation of the contents of *pyfloat*. If
|
||||
*pyfloat* is not a Python floating point object but has a :meth:`~object.__float__`
|
||||
*pyfloat* is not a Python floating-point object but has a :meth:`~object.__float__`
|
||||
method, this method will first be called to convert *pyfloat* into a float.
|
||||
If :meth:`!__float__` is not defined then it falls back to :meth:`~object.__index__`.
|
||||
This method returns ``-1.0`` upon failure, so one should call
|
||||
|
|
|
@ -15,7 +15,7 @@ Numeric values are stored with the least significant byte first.
|
|||
|
||||
The module supports two versions of the data format: version 0 is the
|
||||
historical version, version 1 shares interned strings in the file, and upon
|
||||
unmarshalling. Version 2 uses a binary format for floating point numbers.
|
||||
unmarshalling. Version 2 uses a binary format for floating-point numbers.
|
||||
``Py_MARSHAL_VERSION`` indicates the current file format (currently 2).
|
||||
|
||||
|
||||
|
|
|
@ -51,8 +51,8 @@ Number Protocol
|
|||
|
||||
Return a reasonable approximation for the mathematical value of *o1* divided by
|
||||
*o2*, or ``NULL`` on failure. The return value is "approximate" because binary
|
||||
floating point numbers are approximate; it is not possible to represent all real
|
||||
numbers in base two. This function can return a floating point value when
|
||||
floating-point numbers are approximate; it is not possible to represent all real
|
||||
numbers in base two. This function can return a floating-point value when
|
||||
passed two integers. This is the equivalent of the Python expression ``o1 / o2``.
|
||||
|
||||
|
||||
|
@ -177,8 +177,8 @@ Number Protocol
|
|||
|
||||
Return a reasonable approximation for the mathematical value of *o1* divided by
|
||||
*o2*, or ``NULL`` on failure. The return value is "approximate" because binary
|
||||
floating point numbers are approximate; it is not possible to represent all real
|
||||
numbers in base two. This function can return a floating point value when
|
||||
floating-point numbers are approximate; it is not possible to represent all real
|
||||
numbers in base two. This function can return a floating-point value when
|
||||
passed two integers. The operation is done *in-place* when *o1* supports it.
|
||||
This is the equivalent of the Python statement ``o1 /= o2``.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue