home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / fortran / 4875 < prev    next >
Encoding:
Internet Message Format  |  1992-12-31  |  2.7 KB

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