home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!sun-barr!ames!agate!dog.ee.lbl.gov!hellgate.utah.edu!lanl!cochiti.lanl.gov!jlg
- From: jlg@cochiti.lanl.gov (Jim Giles)
- Subject: Re: Small Language Wanted
- Message-ID: <1992Aug28.153021.1358@newshost.lanl.gov>
- Sender: news@newshost.lanl.gov
- Organization: Los Alamos National Laboratory
- 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>
- Date: Fri, 28 Aug 1992 15:30:21 GMT
- Lines: 17
-
- In article <9224117.23480@mulga.cs.mu.OZ.AU>, fjh@cs.mu.OZ.AU (Fergus Henderson) writes:
- |> [...]
- |> The compiler must generate code that has the *same effect* as
- |> simply converting to double and then calling pow(), but it is
- |> quite free to substitute any equivalent code which may be more
- |> efficient, for example by converting the call to a couple of inline
- |> multiplications.
-
- The above is literally true only if it's the language standard `pow'
- function that's being called. If a user supplied `pow' is to be used
- it would probably be quite inapproptiate for the compiler to optimize
- the call in the way described here. The C standard calls for some
- more arcane rules involving which header files are present and how they
- are defined to determine whether such optimizations are allowed.
-
- --
- J. Giles
-