From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c4cb2c432feebd9d X-Google-Thread: 1094ba,c4cb2c432feebd9d X-Google-Attributes: gid103376,gid1094ba,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 24 May 2006 14:02:57 -0500 Date: Wed, 24 May 2006 12:03:26 -0700 From: glen herrmannsfeldt User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada,comp.lang.fortran Subject: Re: Ada vs Fortran for scientific applications References: <4dd87pF18ot14U1@individual.net> <447207D6.3010408@cits1.stanford.edu> <4dg101F17acafU1@individual.net> <44730df4$1@news.meer.net> <4diimsF1b0c25U1@individual.net> <8V_cg.155757$eR6.70498@bgtnsc04-news.ops.worldnet.att.net> In-Reply-To: <8V_cg.155757$eR6.70498@bgtnsc04-news.ops.worldnet.att.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <646dnfYoKul8MOnZnZ2dnUVZ_tydnZ2d@comcast.com> NNTP-Posting-Host: 24.18.174.4 X-Trace: sv3-zSM9Qi33BAuwGnvtzaeuokmnZnW7qM/M0P2uMZjwfk2OviwdHLaQYxGnHt53DVIfsPY/U2Bpwvn8Xqj!/nMAUtggEnE54fzNJPdNJwOdIidB4+M+jmJUwTMqV+lGdSJAVadKa59IH2b5PyBP+aGJd8wupix3!MsAX1g== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:4428 comp.lang.fortran:10216 Date: 2006-05-24T12:03:26-07:00 List-Id: Dick Hendrickson wrote: (snip, someone wrote) >> Is that through sequence association - i.e., I can assume (conceptually) >> an EUIVALENCE of two reals, the real and imaginary part in that order, to >> be in place for a complex variable? (snip) > However, essentially all of Fortran's rules have an "as if" > clause somewhere in them. If the compiler is sufficiently > clever (and can see enough of the whole program) it can do > anything with complex variables. Keeping temporaries in > registers and discarding them when they become dead is > common practice and is standard conforming. OK, but say for a certain program it is more efficient to store a complex array with all the real parts followed by all the imaginary parts, and the compiler figured this out. The "as if" rule would work only if there was no other way for the program/programmer to discover the change. If the array was in COMMON, EQUIVALENCEd, or passed to an external routine, this optimization most likely couldn't be done. Without any legal way to view the storage association, it would seem possible to do it. -- glen