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 02:11:30 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!tar-alcarin.cbb-automation.DE!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: Standard Library Interest? Date: Thu, 09 Oct 2003 11:20:58 +0200 Message-ID: References: <3F81700B.1050701@noplace.com> <3F82014E.2040002@noplace.com> <3F8485B3.8010109@comcast.net> NNTP-Posting-Host: tar-alcarin.cbb-automation.de (212.79.194.111) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 1065690689 18991702 212.79.194.111 (16 [77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:524 Date: 2003-10-09T11:20:58+02:00 List-Id: On Wed, 08 Oct 2003 21:46:52 GMT, "Robert I. Eachus" wrote: >Marin David Condic wrote: >> It always has been and always will be a "Political Problem". We've known >> for aeons how to make a square root routine. Getting one that could be >> accepted as "Standard" was a political problem. Just because its >> "political" doesn't make it any less a "problem", so we need to find the >> "political" will to do it. From there, the technology is relatively simple. > >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.) Hear! Hear! I remember, an excellent book on numerical methods (Forsyte's, I believe) in early 80s, which started with a square root equation and showed how difficult in fact to solve such an "elementary" thing properly. That time there was no numerical library which had a decent subprogram for that. --- Regards, Dmitry Kazakov www.dmitry-kazakov.de