From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,88ed72d98e6b3457 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-09 06:09:39 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!newsread1.news.atl.earthlink.net.POSTED!not-for-mail Message-ID: <3F855E0F.4070008@noplace.com> From: Marin David Condic User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (OEM-HPQ-PRS1C03) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Standard Library Interest? References: <3F81700B.1050701@noplace.com> <3F82014E.2040002@noplace.com> <3F8485B3.8010109@comcast.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 09 Oct 2003 13:09:38 GMT NNTP-Posting-Host: 209.165.26.89 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.news.atl.earthlink.net 1065704978 209.165.26.89 (Thu, 09 Oct 2003 06:09:38 PDT) NNTP-Posting-Date: Thu, 09 Oct 2003 06:09:38 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:534 Date: 2003-10-09T13:09:38+00:00 List-Id: Now you're talking about having a *Good* square root routine. Your "political position" is that before we can define "Sqrt (X)" we have to know how to make a *good* one. My "political position" is that Fortran had a "Sqrt (X)" that was "good enough" for me to get my work done and that while someone is off defining a better way of computing the result, my code could still be making reference to an interface that looked like "Sqrt (X)" and when the better one comes along, I don't have to change my code because they decided to call it "Square_Root (X)" instead. So you see, that there are *always* "Political Problems" here - finding a reasonable compromise between two or more people's desires and objectives. You wanted mathematical certainty. I wanted interface stability. Someone else probably had other objectives that might or might not have been met. We see the same thing here when discussing a standard library. Some folks want it to be in the ARM. Some want it to be informal. Some want it to be built by assembling existing code. Others want it to be a ground-up effort. There's a million possible ways to go and solving that is a political problem. MDC Robert I. Eachus wrote: > > > I don't want to harp on this, but WHO has known how to make a square > root routine for aeons? In the early sixties it was vital to NASA to do > square roots fast and accurately for the Apollo project. I worked on > this, and the eventual result was to modify four IBM 7094s to include a > 36-bit to 36-bit integer square-root function. I won't go into a long > discussion of WHY a 36-bit to 36-bit square-root with the implicit > binary point to the right of the most significant digit was what was > needed. Just the thought of explaining to ONE more person why that was > what was needed, and that it was a very simple modification of the IBM > 7094 to add it makes me want to scream. > > In the mid-eighties when I was at Stratus, I showed the same thing to > the hardware engineers responsible for the math co-processor software in > the Stratus 200 and 600 series. They agreed it would significantly > improve the speed of their square root routines, but AFAIK, it was never > implemented. (This was when we were about to introduce the 2000 series > which used Motorola 68881 math co-processors.) Later, I implemented > this square-root method in software for Sun SPARCs, since it was so much > faster than Sun's math routines for most SPARC chips. (Most UltraSPARC > chips now seem to do the square-root correctly.) > > So yes, I know how to use the Newton-Rhapson method to find square > roots, and I also know how to implement a square-root in microcode so > that it is faster than the hardware divide. But the idea that this was > well or widely known in 1983 is totally false. There were CPUs in the > nineties that still did it wrong. (Of course, in the nineties Intel > managed to get divide wrong as well. Sigh!) Most implementations of > sine and cosine were pretty good, but other trig functions and all > inverses were spotty. Logs again were spotty both natural and common > logs, and most implementations of exp were a horror. Brian Wichmann did > a lot of work on that, including finding cases where many compilers > computed X**4 wrong, even when X was integer and the result was > therefore exact. (The IBM 360 series and follow-ons were infamous for > printing the sum of 2.0 and 2.0 as 3.9999999999999... But that was > actually a problem in the Fortran print routines, not in the internal > representation.) > -- ====================================================================== Marin David Condic I work for: http://www.belcan.com/ My project is: http://www.jsf.mil/NSFrames.htm Send Replies To: m c o n d i c @ a c m . o r g "All reformers, however strict their social conscience, live in houses just as big as they can pay for." --Logan Pearsall Smith ======================================================================