home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / fortran / 3265 < prev    next >
Encoding:
Text File  |  1992-08-29  |  2.1 KB  |  39 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!cs.utexas.edu!hellgate.utah.edu!lanl!cochiti.lanl.gov!jlg
  3. From: jlg@cochiti.lanl.gov (Jim Giles)
  4. Subject: Re: Small Language Wanted
  5. Message-ID: <1992Aug28.181327.25214@newshost.lanl.gov>
  6. Sender: news@newshost.lanl.gov
  7. Organization: Los Alamos National Laboratory
  8. References: <DAVIS.92Aug23010605@pacific.mps.ohio-state.edu>     <H.3lvmyc56w&A@lionbbs.bs.open.de>     <1992Aug27.181926.5677@alchemy.chem.utoronto.ca>     <9224107.5975@mulga.cs.mu.OZ.AU>     <DAVIS.92Aug27211418@pacific.mps.ohio-state.edu> <DAVIS.92Aug28015332@pacific.mps.ohio-state.edu> <9224117.23480@mulga.cs.mu.OZ.AU> <1992Aug28.153021.1358@newshost.lanl.gov>
  9. Date: Fri, 28 Aug 1992 18:13:27 GMT
  10. Lines: 27
  11.  
  12. In article <1992Aug28.153021.1358@newshost.lanl.gov>, jlg@cochiti.lanl.gov (Jim Giles) writes:
  13. |> In article <9224117.23480@mulga.cs.mu.OZ.AU>, fjh@cs.mu.OZ.AU (Fergus Henderson) writes:
  14. |> |> [...]
  15. |> |> The compiler must generate code that has the *same effect* as
  16. |> |> simply converting to double and then calling pow(), but it is
  17. |> |> quite free to substitute any equivalent code which may be more
  18. |> |> efficient, for example by converting the call to a couple of inline
  19. |> |> multiplications.
  20. |> 
  21. |> The above is literally true only if it's the language standard `pow'
  22. |> function that's being called.  If a user supplied `pow' is to be used
  23. |> it would probably be quite inapproptiate for the compiler to optimize
  24. |> the call in the way described here.  [...]
  25.  
  26. I apologise for posting this incorrect statement.  In fact, all library
  27. function names in ANSI standard C are reserved - the user can't define
  28. his own.  So the above comment only applies to old K&R implementations
  29. which allow the user to do so.  (It's what I get for remembering an old
  30. public review copy of the C standard better than the final version.)
  31.  
  32. This policy of C will probably come back to haunt them: suppose the next
  33. standard wants to add new functions to the standard library?  Reserving
  34. the names will result in breaking any user codes which happen to have
  35. functions with those new names.
  36.  
  37. -- 
  38. J. Giles
  39.