diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2021-01-18 19:30:27 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-05-06 03:51:28 -0400 |
commit | d07cc0d1262366e4b1e6f00ea226b5b9a891b445 (patch) | |
tree | e49ce89cab108bcaa1818ca2f493652d941ecb21 /gcc | |
parent | 1bc178bb6c6f5c959c9fb0d929734c08ad5aa1d5 (diff) | |
download | gcc-d07cc0d1262366e4b1e6f00ea226b5b9a891b445.zip gcc-d07cc0d1262366e4b1e6f00ea226b5b9a891b445.tar.gz gcc-d07cc0d1262366e4b1e6f00ea226b5b9a891b445.tar.bz2 |
[Ada] Document a few more characteristics of floating-point support
gcc/ada/
* doc/gnat_rm/implementation_defined_characteristics.rst (3.5.7):
Mention the IEEE standard explicitly. Use current format names.
Document assumed rounding mode and new features of I/O support.
* gnat_rm.texi: Regenerate.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst | 25 | ||||
-rw-r--r-- | gcc/ada/gnat_rm.texi | 21 |
2 files changed, 32 insertions, 14 deletions
diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst b/gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst index 10fcfc9..8d0be38 100644 --- a/gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst +++ b/gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst @@ -129,20 +129,29 @@ There are no nonstandard real types. "What combinations of requested decimal precision and range are supported for floating point types. See 3.5.7(7)." -The precision and range is as defined by the IEEE standard. +The precision and range are defined by the IEEE Standard for Floating-Point +Arithmetic (IEEE 754-2019). * "The predefined floating point types declared in ``Standard``. See 3.5.7(16)." -====================== ==================================================== +====================== =============================================== Type Representation -====================== ==================================================== -*Short_Float* 32 bit IEEE short -*Float* (Short) 32 bit IEEE short -*Long_Float* 64 bit IEEE long -*Long_Long_Float* 64 bit IEEE long (80 bit IEEE long on x86 processors) -====================== ==================================================== +====================== =============================================== +*Short_Float* IEEE Binary32 (Single) +*Float* IEEE Binary32 (Single) +*Long_Float* IEEE Binary64 (Double) +*Long_Long_Float* IEEE Binary64 (Double) on non-x86 architectures + IEEE 80-bit Extended on x86 architecture +====================== =============================================== + +The default rounding mode specified by the IEEE 754 Standard is assumed for +static computations, i.e. round to nearest, ties to even. The input routines +yield correctly rounded values for Short_Float, Float and Long_Float at least. +The output routines can compute up to twice as many exact digits as the value +of ``T'Digits`` for any type, for example 30 digits for Long_Float; if more +digits are requested, zeros are printed. * "The small of an ordinary fixed point type. See 3.5.9(8)." diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 9427dcc..569b981 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -15667,7 +15667,8 @@ There are no nonstandard real types. are supported for floating point types. See 3.5.7(7)." @end itemize -The precision and range is as defined by the IEEE standard. +The precision and range are defined by the IEEE Standard for Floating-Point +Arithmetic (IEEE 754-2019). @itemize * @@ -15678,7 +15679,7 @@ The precision and range is as defined by the IEEE standard. @end itemize -@multitable {xxxxxxxxxxxxxxxxxxxxxxxx} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} +@multitable {xxxxxxxxxxxxxxxxxxxxxxxx} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} @headitem Type @@ -15693,7 +15694,7 @@ Representation @tab -32 bit IEEE short +IEEE Binary32 (Single) @item @@ -15701,7 +15702,7 @@ Representation @tab -(Short) 32 bit IEEE short +IEEE Binary32 (Single) @item @@ -15709,7 +15710,7 @@ Representation @tab -64 bit IEEE long +IEEE Binary64 (Double) @item @@ -15717,11 +15718,19 @@ Representation @tab -64 bit IEEE long (80 bit IEEE long on x86 processors) +IEEE Binary64 (Double) on non-x86 architectures +IEEE 80-bit Extended on x86 architecture @end multitable +The default rounding mode specified by the IEEE 754 Standard is assumed for +static computations, i.e. round to nearest, ties to even. The input routines +yield correctly rounded values for Short_Float, Float and Long_Float at least. +The output routines can compute up to twice as many exact digits as the value +of @code{T'Digits} for any type, for example 30 digits for Long_Float; if more +digits are requested, zeros are printed. + @itemize * |