[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:
Serhiy Storchaka 2024-07-19 12:13:08 +03:00 committed by GitHub
parent 225cbee8d8
commit a45d9051ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
100 changed files with 238 additions and 238 deletions

View file

@ -178,7 +178,7 @@ _testfunc_array_in_struct3B_set_defaults(void)
/*
* Test3C struct tests the MAX_STRUCT_SIZE 32. Structs containing arrays of up
* to four floating point types are passed in registers on Arm platforms.
* to four floating-point types are passed in registers on Arm platforms.
* This struct is used for within bounds test on Arm platfroms and for an
* out-of-bounds tests for platfroms where MAX_STRUCT_SIZE is less than 32.
* See gh-110190.
@ -202,7 +202,7 @@ _testfunc_array_in_struct3C_set_defaults(void)
/*
* Test3D struct tests the MAX_STRUCT_SIZE 64. Structs containing arrays of up
* to eight floating point types are passed in registers on PPC64LE platforms.
* to eight floating-point types are passed in registers on PPC64LE platforms.
* This struct is used for within bounds test on PPC64LE platfroms and for an
* out-of-bounds tests for platfroms where MAX_STRUCT_SIZE is less than 64.
* See gh-110190.

View file

@ -52,7 +52,7 @@ module _locale
[clinic start generated code]*/
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=ed98569b726feada]*/
/* support functions for formatting floating point numbers */
/* support functions for formatting floating-point numbers */
/* the grouping is terminated by either 0 or CHAR_MAX */
static PyObject*

View file

@ -281,7 +281,7 @@ get_size_t(_structmodulestate *state, PyObject *v, size_t *p)
#define RANGE_ERROR(state, f, flag) return _range_error(state, f, flag)
/* Floating point helpers */
/* Floating-point helpers */
static PyObject *
unpack_halffloat(const char *p, /* start of 2-byte string */

View file

@ -2847,7 +2847,7 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
PyDoc_STRVAR(module_doc,
"This module defines an object type which can efficiently represent\n\
an array of basic values: characters, integers, floating point\n\
an array of basic values: characters, integers, floating-point\n\
numbers. Arrays are sequence types and behave very much like lists,\n\
except that the type of objects stored in them is constrained.\n");
@ -2875,8 +2875,8 @@ The following type codes are defined:\n\
'L' unsigned integer 4\n\
'q' signed integer 8 (see note)\n\
'Q' unsigned integer 8 (see note)\n\
'f' floating point 4\n\
'd' floating point 8\n\
'f' floating-point 4\n\
'd' floating-point 8\n\
\n\
NOTE: The 'u' typecode corresponds to Python's unicode character. On\n\
narrow builds this is 2-bytes on wide builds this is 4-bytes.\n\

View file

@ -34,9 +34,9 @@ PyDoc_STRVAR(math_fsum__doc__,
"fsum($module, seq, /)\n"
"--\n"
"\n"
"Return an accurate floating point sum of values in the iterable seq.\n"
"Return an accurate floating-point sum of values in the iterable seq.\n"
"\n"
"Assumes IEEE-754 floating point arithmetic.");
"Assumes IEEE-754 floating-point arithmetic.");
#define MATH_FSUM_METHODDEF \
{"fsum", (PyCFunction)math_fsum, METH_O, math_fsum__doc__},
@ -610,7 +610,7 @@ PyDoc_STRVAR(math_isclose__doc__,
"isclose($module, /, a, b, *, rel_tol=1e-09, abs_tol=0.0)\n"
"--\n"
"\n"
"Determine whether two floating point numbers are close in value.\n"
"Determine whether two floating-point numbers are close in value.\n"
"\n"
" rel_tol\n"
" maximum difference for being considered \"close\", relative to the\n"
@ -1011,4 +1011,4 @@ math_ulp(PyObject *module, PyObject *arg)
exit:
return return_value;
}
/*[clinic end generated code: output=7d03f84f77342496 input=a9049054013a1b77]*/
/*[clinic end generated code: output=755da3b1dbd9e45f input=a9049054013a1b77]*/

View file

@ -6348,7 +6348,7 @@ PyDoc_STRVAR(os_times__doc__,
"\n"
"The object returned behaves like a named tuple with these fields:\n"
" (utime, stime, cutime, cstime, elapsed_time)\n"
"All fields are floating point numbers.");
"All fields are floating-point numbers.");
#define OS_TIMES_METHODDEF \
{"times", (PyCFunction)os_times, METH_NOARGS, os_times__doc__},
@ -12819,4 +12819,4 @@ os__is_inputhook_installed(PyObject *module, PyObject *Py_UNUSED(ignored))
#ifndef OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF
#define OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF
#endif /* !defined(OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF) */
/*[clinic end generated code: output=cebab1ef718b4878 input=a9049054013a1b77]*/
/*[clinic end generated code: output=6a1d88bd90c7a28b input=a9049054013a1b77]*/

View file

@ -26,7 +26,7 @@ PyDoc_STRVAR(select_select__doc__,
"gotten from a fileno() method call on one of those.\n"
"\n"
"The optional 4th argument specifies a timeout in seconds; it may be\n"
"a floating point number to specify fractions of seconds. If it is absent\n"
"a floating-point number to specify fractions of seconds. If it is absent\n"
"or None, the call will never time out.\n"
"\n"
"The return value is a tuple of three lists corresponding to the first three\n"
@ -1360,4 +1360,4 @@ exit:
#ifndef SELECT_KQUEUE_CONTROL_METHODDEF
#define SELECT_KQUEUE_CONTROL_METHODDEF
#endif /* !defined(SELECT_KQUEUE_CONTROL_METHODDEF) */
/*[clinic end generated code: output=f31e724f492225b1 input=a9049054013a1b77]*/
/*[clinic end generated code: output=f99427b75cbe6d44 input=a9049054013a1b77]*/

View file

@ -597,7 +597,7 @@ PyDoc_STRVAR(signal_sigtimedwait__doc__,
"\n"
"Like sigwaitinfo(), but with a timeout.\n"
"\n"
"The timeout is specified in seconds, with floating point numbers allowed.");
"The timeout is specified in seconds, with floating-point numbers allowed.");
#define SIGNAL_SIGTIMEDWAIT_METHODDEF \
{"sigtimedwait", _PyCFunction_CAST(signal_sigtimedwait), METH_FASTCALL, signal_sigtimedwait__doc__},
@ -776,4 +776,4 @@ exit:
#ifndef SIGNAL_PIDFD_SEND_SIGNAL_METHODDEF
#define SIGNAL_PIDFD_SEND_SIGNAL_METHODDEF
#endif /* !defined(SIGNAL_PIDFD_SEND_SIGNAL_METHODDEF) */
/*[clinic end generated code: output=1c11c1b6f12f26be input=a9049054013a1b77]*/
/*[clinic end generated code: output=6d8e17a32cef668f input=a9049054013a1b77]*/

View file

@ -75,7 +75,7 @@ static fault_handler_t faulthandler_handlers[] = {
#ifdef SIGILL
{SIGILL, 0, "Illegal instruction", },
#endif
{SIGFPE, 0, "Floating point exception", },
{SIGFPE, 0, "Floating-point exception", },
{SIGABRT, 0, "Aborted", },
/* define SIGSEGV at the end to make it the default choice if searching the
handler fails in faulthandler_fatal_error() */

View file

@ -107,7 +107,7 @@ typedef struct{ double hi; double lo; } DoubleLength;
static DoubleLength
dl_fast_sum(double a, double b)
{
/* Algorithm 1.1. Compensated summation of two floating point numbers. */
/* Algorithm 1.1. Compensated summation of two floating-point numbers. */
assert(fabs(a) >= fabs(b));
double x = a + b;
double y = (a - x) + b;
@ -1354,14 +1354,14 @@ math.fsum
seq: object
/
Return an accurate floating point sum of values in the iterable seq.
Return an accurate floating-point sum of values in the iterable seq.
Assumes IEEE-754 floating point arithmetic.
Assumes IEEE-754 floating-point arithmetic.
[clinic start generated code]*/
static PyObject *
math_fsum(PyObject *module, PyObject *seq)
/*[clinic end generated code: output=ba5c672b87fe34fc input=c51b7d8caf6f6e82]*/
/*[clinic end generated code: output=ba5c672b87fe34fc input=4506244ded6057dc]*/
{
PyObject *item, *iter, *sum = NULL;
Py_ssize_t i, j, n = 0, m = NUM_PARTIALS;
@ -2453,7 +2453,7 @@ Since lo**2 is less than 1/2 ulp(csum), we have csum+lo*lo == csum.
To minimize loss of information during the accumulation of fractional
values, each term has a separate accumulator. This also breaks up
sequential dependencies in the inner loop so the CPU can maximize
floating point throughput. [4] On an Apple M1 Max, hypot(*vec)
floating-point throughput. [4] On an Apple M1 Max, hypot(*vec)
takes only 3.33 µsec when len(vec) == 1000.
The square root differential correction is needed because a
@ -3136,7 +3136,7 @@ math.isclose -> bool
maximum difference for being considered "close", regardless of the
magnitude of the input values
Determine whether two floating point numbers are close in value.
Determine whether two floating-point numbers are close in value.
Return True if a is close in value to b, and False otherwise.
@ -3151,7 +3151,7 @@ only close to themselves.
static int
math_isclose_impl(PyObject *module, double a, double b, double rel_tol,
double abs_tol)
/*[clinic end generated code: output=b73070207511952d input=f28671871ea5bfba]*/
/*[clinic end generated code: output=b73070207511952d input=12d41764468bfdb8]*/
{
double diff = 0.0;

View file

@ -10585,12 +10585,12 @@ Return a collection containing process timing information.
The object returned behaves like a named tuple with these fields:
(utime, stime, cutime, cstime, elapsed_time)
All fields are floating point numbers.
All fields are floating-point numbers.
[clinic start generated code]*/
static PyObject *
os_times_impl(PyObject *module)
/*[clinic end generated code: output=35f640503557d32a input=2bf9df3d6ab2e48b]*/
/*[clinic end generated code: output=35f640503557d32a input=8dbfe33a2dcc3df3]*/
{
#ifdef MS_WINDOWS
FILETIME create, exit, kernel, user;

View file

@ -262,7 +262,7 @@ A file descriptor is either a socket or file object, or a small integer
gotten from a fileno() method call on one of those.
The optional 4th argument specifies a timeout in seconds; it may be
a floating point number to specify fractions of seconds. If it is absent
a floating-point number to specify fractions of seconds. If it is absent
or None, the call will never time out.
The return value is a tuple of three lists corresponding to the first three
@ -277,7 +277,7 @@ descriptors can be used.
static PyObject *
select_select_impl(PyObject *module, PyObject *rlist, PyObject *wlist,
PyObject *xlist, PyObject *timeout_obj)
/*[clinic end generated code: output=2b3cfa824f7ae4cf input=e467f5d68033de00]*/
/*[clinic end generated code: output=2b3cfa824f7ae4cf input=1199d5e101abca4a]*/
{
#ifdef SELECT_USES_HEAP
pylist *rfd2obj, *wfd2obj, *efd2obj;

View file

@ -638,7 +638,7 @@ signal_strsignal_impl(PyObject *module, int signalnum)
res = "Aborted";
break;
case SIGFPE:
res = "Floating point exception";
res = "Floating-point exception";
break;
case SIGSEGV:
res = "Segmentation fault";
@ -1199,13 +1199,13 @@ signal.sigtimedwait
Like sigwaitinfo(), but with a timeout.
The timeout is specified in seconds, with floating point numbers allowed.
The timeout is specified in seconds, with floating-point numbers allowed.
[clinic start generated code]*/
static PyObject *
signal_sigtimedwait_impl(PyObject *module, sigset_t sigset,
PyObject *timeout_obj)
/*[clinic end generated code: output=59c8971e8ae18a64 input=87fd39237cf0b7ba]*/
/*[clinic end generated code: output=59c8971e8ae18a64 input=955773219c1596cd]*/
{
PyTime_t timeout;
if (_PyTime_FromSecondsObject(&timeout,

View file

@ -116,7 +116,7 @@ time_time(PyObject *self, PyObject *unused)
PyDoc_STRVAR(time_doc,
"time() -> floating point number\n\
"time() -> floating-point number\n\
\n\
Return the current time in seconds since the Epoch.\n\
Fractions of a second may be present if the system clock provides them.");
@ -350,7 +350,7 @@ time_clock_getres(PyObject *self, PyObject *args)
}
PyDoc_STRVAR(clock_getres_doc,
"clock_getres(clk_id) -> floating point number\n\
"clock_getres(clk_id) -> floating-point number\n\
\n\
Return the resolution (precision) of the specified clock clk_id.");
@ -413,7 +413,7 @@ PyDoc_STRVAR(sleep_doc,
"sleep(seconds)\n\
\n\
Delay execution for a given number of seconds. The argument may be\n\
a floating point number for subsecond precision.");
a floating-point number for subsecond precision.");
static PyStructSequence_Field struct_time_type_fields[] = {
{"tm_year", "year, for example, 1993"},
@ -1104,7 +1104,7 @@ time_mktime(PyObject *module, PyObject *tm_tuple)
}
PyDoc_STRVAR(mktime_doc,
"mktime(tuple) -> floating point number\n\
"mktime(tuple) -> floating-point number\n\
\n\
Convert a time tuple in local time to seconds since the Epoch.\n\
Note that mktime(gmtime(0)) will not generally return zero for most\n\
@ -1902,7 +1902,7 @@ PyDoc_STRVAR(module_doc,
\n\
There are two standard representations of time. One is the number\n\
of seconds since the Epoch, in UTC (a.k.a. GMT). It may be an integer\n\
or a floating point number (to represent fractions of seconds).\n\
or a floating-point number (to represent fractions of seconds).\n\
The epoch is the point where the time starts, the return value of time.gmtime(0).\n\
It is January 1, 1970, 00:00:00 (UTC) on all platforms.\n\
\n\