Boost logo

Boost :

From: Kevin Atkinson (kevinatk_at_[hidden])
Date: 2000-04-25 09:46:34


On Tue, 25 Apr 2000, Kevin Atkinson wrote:

> SMALL_VAL can generally be fixed based on the type.

I take that back. After thinking about it it would depond on the relative
magnitude of what is being compared. I guess you code would be the best
thing to do although couldn't the equal case be defined something like
  rhs.inf() == lhs.inf()
or
  lhs.sup() == lhs.sup()
Which will only involve 3 operations.

Another thing to do is to scale the values based on the exponent of either
rhs or lhs. However if the computer does not see this as a mere exponent
change the performance results could be disastrous.

It seams like safe comparison should really be an operation of the
FPU.....

-- 
Kevin Atkinson
kevinatk_at_[hidden]
http://metalab.unc.edu/kevina/

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk