| Title: | DEC Ada |
| Notice: | Ada is no longer a trademark of the US Government |
| Moderator: | KMOOSE::CMCCUTCHEON |
| Created: | Mon Jan 27 1986 |
| Last Modified: | Fri Jun 06 1997 |
| Last Successful Update: | Fri Jun 06 1997 |
| Number of topics: | 3874 |
| Total number of notes: | 16668 |
Hi,
ALPHA V6.2-1h3
ADA V3.3-7
problem:
A Customer has found that a mathematical expression works on the vax but not
on the alpha.
I typed in the following:
with TEXT_IO;
procedure Float_TEST is
A,B : Long_Float := 0.0;
X : Long_Float := 0.5;
package LF_IO is new Text_IO.Float_IO (Long_Float);
Begin
A := (X**2)**3;
B := (X*X)**3;
TEXT_IO.NEW_LINE;
TEXT_IO.PUT ("A = ");
LF_IO.Put(A);
TEXT_IO.NEW_LINE;
TEXT_IO.PUT ("B = ");
LF_IO.Put(B);
TEXT_IO.NEW_LINE;
end Float_Test;
and ran it on the VAX:
Lite $ run float_test
A = 1.56250000E-02
B = 1.56250000E-02
Lite $ acs show version
DEC Ada V3.2-12 with the Professional Development Option
On an alpha
Supai$ run float_test
A = 6.25000000000000E-02
B = 1.56250000000000E-02
Supai$ acs show version
DEC Ada V3.3-7 with the Professional Development Option
which is what he is seeing.
Any help on this would be appreciated.
Thanks,
Jim Heisler
LST Support Team
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 3851.1 | Looks like a bug | KMOOSE::CMCCUTCHEON | Charlie McCutcheon | Wed Mar 19 1997 13:22 | 26 |
>A = 6.25000000000000E-02 Yes, this looks wrong. I see two workarounds, one of which you know: - code X*X instead of X**2 - Add constant to X's declaration: X : constant Long_Float := 0.5; I tried some different versions of DEC Ada and VMS, and see no differences anywhere on this behavior for OpenVMS Alpha. Since VAX works, I suspect this is an issue with the GEM common code generator. On VAX, we use the VCG (completely different) code generator. I think the second workaround (adding "constant") works due to the compiler being able to optimize the expression at compile time to get the answer. I will put this on my task list for things to look at. Can you give me a priority on this issue? I assuming this isn't a drop dead CLD issue, since they have several workaround, and your base note did not indicate this. We generally encourage SPRs (IMPT level 3) so that the customer gets a formal answer from us on problems. Charlie | |||||
| 3851.2 | Status | CSC32::V_HAVER | Wed Mar 26 1997 12:29 | 9 | |
Charlie, Sorry we didn't get back to you on this. Just like everyone else, we're swamped. In the call report, it says customer considers this critical. However, I can't see any justification for it being critical. Am attempting to contact customer, and after doing so will submit an IPMT case with "hopefully" an appropriate priority. Vicky H. | |||||