]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-37973: Improve the docstrings of sys.float_info (GH-19218)
authorZackery Spytz <zspytz@gmail.com>
Sun, 24 May 2020 10:03:52 +0000 (04:03 -0600)
committerGitHub <noreply@github.com>
Sun, 24 May 2020 10:03:52 +0000 (11:03 +0100)
Taken from https://docs.python.org/3/library/sys.html#sys.float_info

Objects/floatobject.c

index 9f5014092cf20a6124572c006a8775b6fb137c96..cc0ae8ce819086d92114f93592681cfbaffe0337 100644 (file)
@@ -59,12 +59,14 @@ static PyStructSequence_Field floatinfo_fields[] = {
                     "is a normalized float"},
     {"min_10_exp",      "DBL_MIN_10_EXP -- minimum int e such that 10**e is "
                     "a normalized"},
-    {"dig",             "DBL_DIG -- digits"},
+    {"dig",             "DBL_DIG -- maximum number of decimal digits that "
+                    "can be faithfully represented in a float"},
     {"mant_dig",        "DBL_MANT_DIG -- mantissa digits"},
     {"epsilon",         "DBL_EPSILON -- Difference between 1 and the next "
                     "representable float"},
     {"radix",           "FLT_RADIX -- radix of exponent"},
-    {"rounds",          "FLT_ROUNDS -- rounding mode"},
+    {"rounds",          "FLT_ROUNDS -- rounding mode used for arithmetic "
+                    "operations"},
     {0}
 };