aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2020-09-19 10:42:51 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2020-10-26 04:59:12 -0400
commitd4506716bcd7e43d998deaa54739e1df4175e050 (patch)
treee3a69f9acde64cce583558470191eb83a81c80cc /gcc
parentacd4ef9df257ce400c5eabfa9ab92a1b3196e090 (diff)
downloadgcc-d4506716bcd7e43d998deaa54739e1df4175e050.zip
gcc-d4506716bcd7e43d998deaa54739e1df4175e050.tar.gz
gcc-d4506716bcd7e43d998deaa54739e1df4175e050.tar.bz2
[Ada] Another small edition to documentation of Ada.Text_IO.Fixed_IO
gcc/ada/ * libgnat/a-tifiio.adb: Move around documentaton paragraph.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/libgnat/a-tifiio.adb29
1 files changed, 14 insertions, 15 deletions
diff --git a/gcc/ada/libgnat/a-tifiio.adb b/gcc/ada/libgnat/a-tifiio.adb
index f48239f..f6777f6 100644
--- a/gcc/ada/libgnat/a-tifiio.adb
+++ b/gcc/ada/libgnat/a-tifiio.adb
@@ -140,21 +140,6 @@
-- solution. The downside however may be a too limited set of acceptable
-- fixed point types.
--- Extra Precision
--- ---------------
-
--- Using a scaled divide which truncates and returns a remainder R,
--- another E trailing digits can be calculated by computing the value
--- (R * (10.0**E)) / Z using another scaled divide. This procedure
--- can be repeated to compute an arbitrary number of digits in linear
--- time and storage. The last scaled divide should be rounded, with
--- a possible carry propagating to the more significant digits, to
--- ensure correct rounding of the unit in the last place.
-
--- An extension of this technique is to limit the value of Q to 9 decimal
--- digits, since 32-bit integers can be much more efficient than 64-bit
--- integers to output.
-
with Interfaces; use Interfaces;
with System.Arith_64; use System.Arith_64;
with System.Img_Real; use System.Img_Real;
@@ -260,6 +245,20 @@ package body Ada.Text_IO.Fixed_IO is
-- in the denominator for the extra decimal scaling required, so case (3)
-- will not overflow.
+ -- Extra Precision
+
+ -- Using a scaled divide which truncates and returns a remainder R,
+ -- another E trailing digits can be calculated by computing the value
+ -- (R * (10.0**E)) / Z using another scaled divide. This procedure
+ -- can be repeated to compute an arbitrary number of digits in linear
+ -- time and storage. The last scaled divide should be rounded, with
+ -- a possible carry propagating to the more significant digits, to
+ -- ensure correct rounding of the unit in the last place.
+
+ -- A variant of this technique is to limit the value of Q to 9 decimal
+ -- digits, since 32-bit integers can be much more efficient than 64-bit
+ -- integers to output.
+
pragma Assert (System.Fine_Delta >= 2.0**(-63));
pragma Assert (Num'Small in 2.0**(-80) .. 2.0**80);
pragma Assert (Num'Fore <= 37);