This is the mail archive of the
mailing list for the GCC project.
Re: Ada: fix compile time evaluation of Long_Florst'Succ (0.0)
- From: Geert Bosch <bosch at gnat dot com>
- To: ja2morri at csclub dot uwaterloo dot ca (James A. Morrison)
- Cc: Arnaud Charlet <charlet at ACT-Europe dot FR>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 21 Nov 2004 19:13:41 -0500
- Subject: Re: Ada: fix compile time evaluation of Long_Florst'Succ (0.0)
- References: <20041027095119.GC91230@province.act-europe.fr> <firstname.lastname@example.org>
On Nov 21, 2004, at 15:42, James A. Morrison wrote:
Is 4.94065645841247E-324 the expected answer? Is it good enough to
any value between say 3.11111111e-324 and 6.999999999e-324 ?
X should be calculated exactly, so the answer is
precisely 2#1.0#E-1074 on a target that supports
denormal numbers. This is about 4.94065645841247E-324.
On targets without gradual underflow, the X would
be 2#1.0#E-1022, or 2.22507385850720E-308.
However, the output routine does not necessarily be
able to convert to decimal absolutely accurately.
The patch addresses the evaluation of "static" expressions,
which in Ada have to always be evaluated with infinite
precision. Note that for an expression to be static
is a much stricter term than to be "known at compile time".