Path: utzoo!utgpu!water!watmath!clyde!rutgers!mailrus!nrl-cmf!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Why I use C instead of fortran Message-ID: <7217@brl-smoke.ARPA> Date: 8 Feb 88 11:50:01 GMT References: <11440@brl-adm.ARPA> <3597@sdcc6.ucsd.EDU> <257@tolsun.oulu.fi> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 30 In article <257@tolsun.oulu.fi> jto@tolsun.UUCP (Jarkko Oikarinen) writes: >For serious number-crunching I think FORTRAN is superior to C. > 1) COMPLEX variables: Write complex arcus hyperbolic tangent in C! Certainly, things that are built into the language are more convenient. Complex arithmetic is the only example anyone ever comes up with; by now all of us C numerical programmers have our own complex arithmetic support, which we were able to write effectively in C using its data structuring facilities (in a very simple way -- no linked lists etc.). In over a dozen years of scientific programming in Fortran, however, I seldom (I won't say never) had occasion to use COMPLEX arithmetic. I did, on the other hand, often wish for reasonable support for data structures! Now that I have C available, you won't catch me using Fortran at all (except occasionally in interfacing to existing Fortran-based applications). By the way, complex arithmetic was proposed for ANSI C, but it didn't muster enough support. I think this was mostly because it would be a large new invention, and the main argument for it was that it would make C more palatable to Fortran programmers. I know I dislike that type of argumentation, and perhaps so did others.. There are many other types of number (and other mathematical objects) that neither language supports. At least with C I can implement my own support for them. > 2) single precision: all (ALL) real math is performed in double > precision in C. There were historical reasons for this, but it's fixed in ANSI C.