Article View: comp.arch
Article #11051Re: integer distance or sqrt
From: Frank Klemm
Date: Tue, 17 Nov 1992 17:18
Date: Tue, 17 Nov 1992 17:18
24 lines
1868 bytes
1868 bytes
In article <CLIFFC.92Nov15184340@miranda.rice.edu>, cliffc@rice.edu (Cliff Click) writes: |> bbs.dennis@tsoft.sf-bay.org (Dennis Yelle) writes: |> > because of the interest in Herman Rubin's optimization problems |> > some people here might be interested in this. |> > It is a real problem. That is, I have a program that spends quite a |> > lot of time here, and I would like to change this if I could. |> |> > I first considered asking for a integer sqrt, but maybe if the context is |> > known a better answer can be given. This program is normally run on a |> > machine with no floating point hardware so I would like to get rid of |> > floats entirely. |> |> I sent him an integer square root code using Newton's Method. I've done |> this problem before and I'm sure there are better methods out there. Does |> somebody want to post/email something better than Newton's? |> I have programmed several methods on a i386. Newton is the fastest if the mul instruction is so slow as on a Intel. If multiplication is fast and division is slow, bit trying and a newton cycle is an optimum. So I need the time of the div and mul and if the instruction exist, of a bit search instruction to evalutate this problem. Is an error of a LSB critical (sqrt(24)=5) is another question. Frank
Technical Details
Message-ID:
<1992Nov17.171815.7039@rz.uni-jena.de>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!darwin.sura.net!Sirius.dfn.de!hpux.rz.uni-jena.de!pfkReferences:
<55F0TB1w165w@tsoft.sf-bay.org> <CLIFFC.92Nov15184340@miranda.rice.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.arch Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!darwin.sura.net!Sirius.dfn.de!hpux.rz.uni-jena.de!pfk From: pfk@rz.uni-jena.de (Frank Klemm) Subject: Re: integer distance or sqrt Message-ID: <1992Nov17.171815.7039@rz.uni-jena.de> Sender: pfk@rz.uni-jena.de (Frank Klemm) Reply-To: pfk@rz.uni-jena.de (Frank Klemm) Organization: Friedrich-Schiller-University Jena, Germany References: <55F0TB1w165w@tsoft.sf-bay.org> <CLIFFC.92Nov15184340@miranda.rice.edu> Date: Tue, 17 Nov 1992 17:18:15 GMT Lines: 24