Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6562939

Browse files
authored
gh-85988: Change documentation for sys.float_info.rounds (GH-99675)
* Change documentation for sys.float_info.roundsChange the documentation for sys.float_info.rounds to removereferences to C99 section 5.2.4.2.2 and instead place theavailable values inline.* Correction to previous documentation changeNewlines were not preserved in generated HTML on previouscommit. I have changes the list to a comma-separated listof values and their meanings.* Clarify source for value of FLT_ROUNDSClarify the source of the FLT_ROUNDS value andchange 'floating-point addition' to 'floating-pointarithmetic' to indicate that the rounding modeapplies to all arithmetic operations.
1 parent22860db commit6562939

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

‎Doc/library/sys.rst

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -604,12 +604,18 @@ always available.
604604
+---------------------+----------------+--------------------------------------------------+
605605
|:const:`radix`| FLT_RADIX| radix of exponent representation|
606606
+---------------------+----------------+--------------------------------------------------+
607-
|:const:`rounds`| FLT_ROUNDS| integer constant representing the rounding mode|
608-
||| used for arithmetic operations. This reflects|
609-
||| the value of the system FLT_ROUNDS macro at|
610-
||| interpreter startup time. See section 5.2.4.2.2|
611-
||| of the C99 standard for an explanation of the|
612-
||| possible values and their meanings.|
607+
|:const:`rounds`| FLT_ROUNDS| integer representing the rounding mode for|
608+
||| floating-point arithmetic. This reflects the|
609+
||| value of the system FLT_ROUNDS macro at|
610+
||| interpreter startup time:|
611+
||| ``-1`` indeterminable,|
612+
||| ``0`` toward zero,|
613+
||| ``1`` to nearest,|
614+
||| ``2`` toward positive infinity,|
615+
||| ``3`` toward negative infinity|
616+
||||
617+
||| All other values for FLT_ROUNDS characterize|
618+
||| implementation-defined rounding behavior.|
613619
+---------------------+----------------+--------------------------------------------------+
614620

615621
The attribute:attr:`sys.float_info.dig` needs further explanation. If

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp