Hi Roland,
You'll still (admittedly extremely rarely if you set appDef_decCntMul small enough) end up with false negatives from that (see below). Which may not be a problem. Although I suppose that by vounting through twice you could offset by half appDef_decCntMul in the second loop and look and add anything that matches there to your list of matches.
below will avoid false negatives, but give (arguable) false positives...
Tim
You'll still (admittedly extremely rarely if you set appDef_decCntMul small enough) end up with false negatives from that (see below). Which may not be a problem. Although I suppose that by vounting through twice you could offset by half appDef_decCntMul in the second loop and look and add anything that matches there to your list of matches.
Code:
appDef_decCntMul=10000 #1e-4 precision
# Before flooring
Point1=(0.44499...,0.99434...)
Point2=(0.44500...,0.99434...)
# floor
Point1F=(0.4449,0.9943)
Point2F=(0.4450,0.9943)
# compare
bitwise=(Point1F==Point2F) # is false
distance=norm(Point1-Point2) # 1e-5 < Precision
Code:
appDef_decCntMul=10000 #1e-4 precision
# Before flooring
Point1=(0.44499...,0.99434...)
Point2=(0.44500...,0.99434...)
# floor
Point1F=(0.4449,0.9943)
Point2F=(0.4450,0.9943)
# round(x) = floor(x+0.5)
Point1R=(0.4450,0.9943)
Point2R=(0.4450,0.9943)
# compare
bitwise=(Point1F==Point2F) || (Point1R==Point2R) # is true
distance=norm(Point1-Point2) # 1e-5 < Precision
Tim