Subj : Re: Rational Trig To : comp.programming From : William Date : Sun Sep 18 2005 12:51 pm "Gerry Quinn" wrote in message news:MPG.1d97564247ecb7fc98a5b2@news.indigo.ie... > > I am unconvinced that recursion and look-up tables are to be avoided > simply by replacing distances by their squares, and angles by the > squares of their sins. Aren't we going to need them to get from > quadratures to distances, in any case? Distances are not going to go > away as a commonly desired result from calculations. But not always, and if this helps people see that, it could be very useful. In fact, just a few days ago someone was asking about efficient ways to find the closest points between two arrays of 3D points. A number of proposed solutions involved square roots when there is no reason to take a square root at all. (Squared distances compare just as easily as the distances themselves.) Likewise, I've optimised a number of algorithms by using ratios instead of angles. And line slope IS a ratio - no reason to complete the division if you can work with the components directly. -Wm .