Man this is a headache indeed!
Ok. so. I think I finaly was able to "normalize" the values.
This seems to provide what I want.
Code: Select all
lt.f=(1.0*0.707*-0.8165*-0.5774)*3.000182113754469
rt.f=(1.0*0.707*0.5774*0.8165)*3.0001821137544694
Debug lt
Debug rt
Debug ""
dlt.d=(1.0*0.707*-0.8165*-0.5774)*3.000182113754469
drt.d=(1.0*0.707*0.5774*0.8165)*3.0001821137544694
Debug dlt
Debug drt
What I don't get though is... why does drt line need that 4 to the end,
but not the dlt, is really float math in general that "off"
when using positive vs negative values?
Gah they do.... I just checked using windows calculator.
Entering (1.0*0.707*-0.8165*-0.5774)*3.000182113754469
produce 1,0000000000000000671175593
entering (1.0*0.707*0.5774*0.8165)*3.000182113754469
produce 1,000546308100000671175593
Great, that means I gotta recalculate everything, dammit

So the positive math is "correct" I can safely assume,
but when float (single or doubles) seems to have a "error" when negatives are used.
No fault of PB I assume, my guess this is a "error" in the float standards,
or rather a natural bias due to the (pun intended) floating behaviour of floats.
Ok, consider this a non-bug then.
But may I request a note to be added to PB manual?
That negative float math may produce slightly different result than positive float math. I don't think many are aware of this fact. I sure didn't know this.
Thanks Fred, you just restored my sanity
EDIT: Damn Dare, you ninja posted me
