Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!think!barmar From: barmar@think.COM (Barry Margolin) Newsgroups: comp.arch Subject: Re: Professional Programmers (was: Seeing the future) Message-ID: <32353@think.UUCP> Date: 30 Nov 88 16:28:38 GMT References: <1984@eos.UUCP> <28200245@mcdurb> <321@taux02.UUCP> Sender: news@think.UUCP Reply-To: barmar@kulla.think.com.UUCP (Barry Margolin) Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 25 In article <321@taux02.UUCP> amos@taux02.UUCP (Amos Shapir) writes: >Most of what a professional programmer does when helping scientists, >is to change things like cos(atan(x))**2 to 1/(1+x*x) . What does this have to do with being a professional PROGRAMMER? The above identity is a MATHEMATICAL fact, having nothing to do with computers, except insofar as the above statements in a program approximate the corresponding mathematical operations. I would expect the above knowledge to be in a mathematician's (and perhaps even a scientist's) bag of tricks, but not necessarily a programmer's. Maybe a programmer who specializes in scientific or mathematical programming (I'm primarily a systems programmer, so I rarely use trig functions) should also know them, but I'm not sure that I would fault one for not knowing them. It would be nice if compiler optimizer writers could put these in; however, it is frequently difficult to recognize the constructs (what if the expression were split across several statements, using a temporary variable), and it's not obvious that they would come up frequently enough to justify the work of putting such optimizations in. Barry Margolin Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar