From: Eric Botcazou Date: Mon, 18 Jan 2021 18:30:27 +0000 (+0100) Subject: [Ada] Document a few more characteristics of floating-point support X-Git-Tag: basepoints/gcc-13~7775 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d07cc0d1262366e4b1e6f00ea226b5b9a891b445;p=thirdparty%2Fgcc.git [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. --- diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst b/gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst index 10fcfc93c1d0..8d0be38d9aaf 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 9427dccf674e..569b9812eff8 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 *