@@ -568,55 +568,55 @@ always available.
568
568
569
569
.. tabularcolumns :: |l|l|L|
570
570
571
- +---------------------+----------------+--------------------------------------------------+
572
- | attribute | float.h macro | explanation |
573
- +=====================+================+==================================================+
574
- | :const: ` epsilon ` | DBL_EPSILON | difference between 1.0 and the least value |
575
- | | | greater than 1.0 that is representable as a float|
576
- | | | |
577
- | | | See also :func: `math.ulp `. |
578
- +---------------------+----------------+--------------------------------------------------+
579
- | :const: ` dig ` | DBL_DIG | maximum number of decimal digits that can be |
580
- | | | faithfully represented in a float; see below |
581
- +---------------------+----------------+--------------------------------------------------+
582
- | :const: ` mant_dig ` | DBL_MANT_DIG | float precision: the number of base-``radix `` |
583
- | | | digits in the significand of a float |
584
- +---------------------+----------------+--------------------------------------------------+
585
- | :const: ` max ` | DBL_MAX | maximum representable positive finite float |
586
- +---------------------+----------------+--------------------------------------------------+
587
- | :const: ` max_exp ` | DBL_MAX_EXP | maximum integer *e* such that ``radix**(e-1)`` is|
588
- | | | a representable finite float |
589
- +---------------------+----------------+--------------------------------------------------+
590
- | :const: ` max_10_exp ` | DBL_MAX_10_EXP | maximum integer *e* such that ``10**e`` is in the|
591
- | | | range of representable finite floats |
592
- +---------------------+----------------+--------------------------------------------------+
593
- | :const: ` min ` | DBL_MIN | minimum representable positive *normalized* float|
594
- | | | |
595
- | | | Use :func: `math.ulp(0.0) <math.ulp> ` to get the |
596
- | | | smallest positive *denormalized * representable |
597
- | | | float. |
598
- +---------------------+----------------+--------------------------------------------------+
599
- | :const: ` min_exp ` | DBL_MIN_EXP | minimum integer *e* such that ``radix**(e-1)`` is|
600
- | | | a normalized float |
601
- +---------------------+----------------+--------------------------------------------------+
602
- | :const: ` min_10_exp ` | DBL_MIN_10_EXP | minimum integer *e * such that ``10**e `` is a |
603
- | | | normalized float |
604
- +---------------------+----------------+--------------------------------------------------+
605
- | :const: ` radix ` | FLT_RADIX | radix of exponent representation |
606
- +---------------------+----------------+--------------------------------------------------+
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. |
619
- +---------------------+----------------+--------------------------------------------------+
571
+ +---------------------+--------------------- +--------------------------------------------------+
572
+ | attribute | float.h macro | explanation |
573
+ +=====================+===================== +==================================================+
574
+ | `` epsilon `` | `` DBL_EPSILON `` | difference between 1.0 and the least value |
575
+ | | | greater than 1.0 that is representable as a float|
576
+ | | | |
577
+ | | | See also :func: `math.ulp `. |
578
+ +---------------------+--------------------- +--------------------------------------------------+
579
+ | `` dig `` | `` DBL_DIG `` | maximum number of decimal digits that can be |
580
+ | | | faithfully represented in a float; see below |
581
+ +---------------------+--------------------- +--------------------------------------------------+
582
+ | `` mant_dig `` | `` DBL_MANT_DIG `` | float precision: the number of base-``radix `` |
583
+ | | | digits in the significand of a float |
584
+ +---------------------+--------------------- +--------------------------------------------------+
585
+ | `` max `` | `` DBL_MAX `` | maximum representable positive finite float |
586
+ +---------------------+--------------------- +--------------------------------------------------+
587
+ | `` max_exp `` | `` DBL_MAX_EXP `` | maximum integer *e* such that ``radix**(e-1)`` is|
588
+ | | | a representable finite float |
589
+ +---------------------+--------------------- +--------------------------------------------------+
590
+ | `` max_10_exp `` | `` DBL_MAX_10_EXP `` | maximum integer *e* such that ``10**e`` is in the|
591
+ | | | range of representable finite floats |
592
+ +---------------------+--------------------- +--------------------------------------------------+
593
+ | `` min `` | `` DBL_MIN `` | minimum representable positive *normalized* float|
594
+ | | | |
595
+ | | | Use :func: `math.ulp(0.0) <math.ulp> ` to get the |
596
+ | | | smallest positive *denormalized * representable |
597
+ | | | float. |
598
+ +---------------------+--------------------- +--------------------------------------------------+
599
+ | `` min_exp `` | `` DBL_MIN_EXP `` | minimum integer *e* such that ``radix**(e-1)`` is|
600
+ | | | a normalized float |
601
+ +---------------------+--------------------- +--------------------------------------------------+
602
+ | `` min_10_exp `` | `` DBL_MIN_10_EXP `` | minimum integer *e * such that ``10**e `` is a |
603
+ | | | normalized float |
604
+ +---------------------+--------------------- +--------------------------------------------------+
605
+ | `` radix `` | `` FLT_RADIX `` | radix of exponent representation |
606
+ +---------------------+--------------------- +--------------------------------------------------+
607
+ | `` 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. |
619
+ +---------------------+--------------------- +--------------------------------------------------+
620
620
621
621
The attribute :attr: `sys.float_info.dig ` needs further explanation. If
622
622
``s `` is any string representing a decimal number with at most
0 commit comments