Xref: utzoo comp.lang.fortran:4148 comp.lang.c:34255 Newsgroups: comp.lang.fortran,comp.lang.c Path: utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: Fortran vs. C for numerical work (SUMMARY) Message-ID: <1990Nov27.175023.26039@zoo.toronto.edu> Organization: U of Toronto Zoology References: <21884@orstcs.CS.ORST.EDU> <1990Nov21.220816.15220@rice.edu> <2173@tuvie> Date: Tue, 27 Nov 90 17:50:23 GMT In article bglenden@mandrill.cv.nrao.edu (Brian Glendenning) writes: >3. In fortran functions like sin, cos, ** are intrinsic. > >I think that ANSI C has a method by which compilers may make sin, cos >etc intrinsic, but I don't remember how it works... It's really very simple: they are allowed to be intrinsic, essentially. There is no complexity or mystery. C and Fortran are no longer different in this regard, except insofar as the Fortran libraries are larger. >6. C can ignore the placement of parentheses Not any more. This too is an obsolete argument. >7. "C has too many system dependent aspects (e.g. round up or down when > dividing negative integers)." A lot of the purportedly "system dependent aspects" also exist in Fortran. This particular one doesn't, but that is a concession to efficiency in an area that rarely matters to programmers. What it is, in fact, is permission to the hardware to do things the wrong way because Fortran wants it that way! People who use this argument are missing an important point: C may have system-dependent aspects, but well-crafted C programs do not. Those who believe that Fortran programs are automatically system-independent have not tried to port very many amateur-written Fortran programs. (Programs written by competent professionals avoid these problems regardless of the choice of language.) -- "I'm not sure it's possible | Henry Spencer at U of Toronto Zoology to explain how X works." | henry@zoo.toronto.edu utzoo!henry