home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!wupost!gumby!yale!mintaka.lcs.mit.edu!ai-lab!life.ai.mit.edu!burley
- From: burley@apple-gunkies.gnu.ai.mit.edu (Craig Burley)
- Newsgroups: comp.lang.fortran
- Subject: Re: SPECIFIC Question about Fortran (vs. C)
- Date: 30 Dec 92 23:35:31
- Organization: Free Software Foundation 545 Tech Square Cambridge, MA 02139
- Lines: 56
- Message-ID: <BURLEY.92Dec30233531@apple-gunkies.gnu.ai.mit.edu>
- References: <C034uA.7qu@news.cso.uiuc.edu>
- NNTP-Posting-Host: apple-gunkies.gnu.ai.mit.edu
- In-reply-to: ritley@uimrl7.mrl.uiuc.edu's message of Wed, 30 Dec 1992 18:32:34 GMT
-
- In article <C034uA.7qu@news.cso.uiuc.edu> ritley@uimrl7.mrl.uiuc.edu () writes:
-
- In the recent discussion regarding whether or not Fortran is dead,
- the following comment piqued my curiosity:
-
- From: mjl@dino.ph.utexas.edu (Maurice J. LeBrun)
-
- >... Fortran (which translates very efficiently into machine
- >language) has stayed preeminent in numerical computing.
-
- Although I could probably hunt down references about this in the
- library, I'd like to ask: Do the standards which define Fortran
- actually specify the type of machine code to be generated? Do
- they specify, for example, _how_ a square root should be computed,
- or rather the accuracy with which it should be computed, or
- possibly none of these things?
-
- No. No, no, yes. As far as I can tell, it is standard-conforming
- for
-
- WRITE (*,*) SQRT(4.)
-
- to output:
-
- 1.3
-
- In particular, although standard programs will compile on standard
- compilers, is there anything in the published Fortran standard
- which discusses the numerical results which standard programs are
- expected to output (excluding issues like number of loop
- iterations)?
-
- Not really, no. It is apparently not considered within the scope of a
- language standard to specify the range and precision of numerical
- results.
-
- [ If so, then might anyone know if 'C' similarly is written to conform
- to such standards. ]
-
- C is no better in this regard.
-
- I think the problem is that trying to have a language standard get too
- involved with specifying conforming mathematics leaves the standard open
- to becoming less useful for some machines that can't achieve standards
- and those who exceed the standards.
-
- Someday there might be an accepted way to specify _how_ accurate a
- particular implementation of Fortran is, and that technique (or set of
- techniques) might find its way into future standards for languages like
- Fortran, but for now, leaving such stuff out is probably best. Its
- up to users to demand the accuracy/performance tradeoff they want in a
- particular case.
- --
-
- James Craig Burley, Software Craftsperson burley@gnu.ai.mit.edu
- Member of the League for Programming Freedom (LPF) lpf@uunet.uu.net
-