From: boost (boost_at_[hidden])
Date: 2001-05-25 19:54:49
On Friday 25 May 2001 19:53, you wrote:
> Just a quick reply to the overflow question. One way to handle this
> is to find the largest of ar, br, cr, dr, scale them all by that
> value, compute the scaled denominator, compute the scaled at, bt, ct,
> dt, and then re-scale the results.
Sure, I thought that's clear.
> If I count correctly, there are three comparisons, four divides, and
> one more multiply introduced.
> Actually, to do this a little better, one would want to compute
> inverse quantities and do multiplies rather than divides throughout.
Ups, I overlooked that. Well I wrote my comment on my laptop sitting in the
> Then there would be three comparisons, one divide, and six more
> multiplies introduced to deal with the overflow issue. The original
> method should be modified to include one divide and four multiplies
> rather than four divides. This is all assuming the basic type of the
> quaternion is something the compiler/cpu would deal with efficiently.
If it's unlcear could provide a few samples.
But currently I'm more concerned with overflows and accuracy.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk