Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!dcl-cs!aber-cs!athene!pcg From: pcg@cs.aber.ac.uk (Piercarlo Grandi) Newsgroups: comp.lang.misc Subject: Re: Fortran vs. C for numerical work Message-ID: Date: 7 Dec 90 15:02:37 GMT References: <1980@mts.ucs.UAlberta.CA> <18016@hydra.gatech.EDU> <16671@csli.Stanford.EDU> <1990Dec5.022302.25764@alchemy.chem.utoronto.ca> Sender: pcg@aber-cs.UUCP Organization: Coleg Prifysgol Cymru Lines: 60 Nntp-Posting-Host: odin In-reply-to: mroussel@alchemy.chem.utoronto.ca's message of 5 Dec 90 02:23:02 GMT Note: this posting may look like a flame. Unfortunately it is not. It is a dire and stern warning. Think over it over and over again if you think you have reason to disagree. On 5 Dec 90 02:23:02 GMT, mroussel@alchemy.chem.utoronto.ca (Marc Roussel) said: mroussel> Fortran has a relatively simple relation to mathematical mroussel> formulae. Hahahahahahahahaha! If only it were that easy. Ever heard of problems with associativity for example? I am very sure that the relation of Fortran to mathematical formulae is a very difficult and subtle and highly counterintuitive one, and that a lot of research has gone into the past to map some of its simpler aspects, or to work around the more difficult ones that are too difficult for us to understand. mroussel> You write the formula on paper and then transcribe it more or mroussel> less directly into your program; this is especially true of mroussel> Fortran 77 with it's intelligent type conversions and mroussel> intrinsic function selection. This is one of the tragedies of Fortran, that it traps people that do not understand about computers to think they do. Anybody who is good at maths thinks he/she is by God'a gift a good numerical analyst too. Doesn't Fortran give you real numbers, mathematical formulas, and familiar looking syntax? Fortran == maths! Frankly, a lot of mathematical research with computers is entirely meaningless because of this ridiculous delusion. Me, I am not a numerical analyst, but I know enough about computers to understand that numerical computing is a minefield of very difficult problems, and that the least of them is having a familiar notation that is utterly misleading (a+b in Fortran has completely different semantics from, only very remotely similar to, the semantics of a+b in maths). I hope that people like the guy above read the famous (evidently not enough!) paper on how to find the real roots of 2nd order polynomial equations (ax^2+bx+c=0) by computer (I cannot remember the author now -- Dekker maybe -- but I remember the paper is looong and difficult) and be ashamed (yes, ashamed) for ever having thought that the resemblance of Fortran's notation with maths is anything more than a honey trap for the unwary. What are the good languages for numerical research then? Sadly, Fortran is so preminent, precisely because it deceives the unwary about the immense chasm between maths and numerical computing, that I cannot think of any other similar low level language. I'd venture to say that as things stand probably Scheme is currently the best language for numerical analysis (if you think I am joking, think it over again *very* carefully), or some of the newer language with abstraction facilities, like C++. -- Piercarlo Grandi | ARPA: pcg%uk.ac.aber.cs@nsfnet-relay.ac.uk Dept of CS, UCW Aberystwyth | UUCP: ...!mcsun!ukc!aber-cs!pcg Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk