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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fedc2d05e82c9174 X-Google-Attributes: gid103376,public From: robert_dewar@my-dejanews.com Subject: Re: Calculating SQRT in ADA Date: 1999/03/30 Message-ID: <7dq5b2$2dk$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 460683311 References: <7dbv6t$4u5$1@nnrp1.dejanews.com> <19990324201959.00800.00000708@ngol04.aol.com> <7dei9a$dvo$1@nnrp1.dejanews.com> <7dhjhi$27a$1@nnrp1.dejanews.com> <36FFF83A.BE789C93@mitre.org> X-Http-Proxy: 1.0 x1.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Tue Mar 30 09:26:00 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-03-30T00:00:00+00:00 List-Id: In article <36FFF83A.BE789C93@mitre.org>, "Robert I. Eachus" wrote: > Nowadays it is very hard to improve on the "hardware" > IEEE > instructions, I am not sure what this refers to, what "hardware" IEEE instructions are you referring to. Certainly IEEE does not include elementary functions except for sqrt, and this is of course NOT hardware on most machines. > even when they involve some software > emulation. "some software emulation" = done by a software library routine for most architectures for sqrt, and there are no other operations defined in IEEE. Back to > the original topic, the best way to compute square roots > is not to use > NR, but to use the same algorithm you learned in school > (with calculating the exponent correctly for > floating-point values). On most > RISC hardware it is slightly faster than one > floating-point divide, so > Newton-Rhapson can't compete. (Of course, the hardware > instruction, if > it is really done in hardware, is faster still.) Sure, a sqrt in hardware can be as fast as a divide, since a very similar algorithm can be used. But I challenge your initial statement here. Please cough up code on a specific machine to justify the statement that you can do a sqrt in floating-point divide time. -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own