This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ada: fix compile time evaluation of Long_Florst'Succ (0.0)



On Nov 21, 2004, at 15:42, James A. Morrison wrote:
Is 4.94065645841247E-324 the expected answer? Is it good enough to have
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".

-Geert


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]