Original Post
This seems to work with really good precision. Is there a name for this operation? x=abs(x); y=abs(y); z=abs(z); d=(((x+y)-(x*y/2))+z)-(((x+y)-(x*y/2))*z/2);
Quote:
Original post by Scuppy
Try using x=1, y=1 and z=1, or x=1, y=1 and z=0. Shouldnt that return 1?
Quote:What you posted isn't due to LaMothe, and I hope he doesn't present it as it is. The approximation
Original post by pichu
I think I recall seeing something like that in one of Andre LaMothe's books... it looks similar, can't recall off the top of my head. [...] LaMothe does some incredible math stuff...
Quote:Is that for the formula the OP posted? Not sure how you'd get those errors for that formula (and why you have two errors). Are you assuming inputs in some limited range (i.e. prescaled values)?
Original post by Sneftel
It produces values which are only 1% and 6% off the correct values, actually. Surprisingly good.
Quote:
Original post by Christer Ericson
Is that for the formula the OP posted? Not sure how you'd get those errors for that formula (and why you have two errors). Are you assuming inputs in some limited range (i.e. prescaled values)?
Quote:
For ease of error calculation, assume x=y=z.
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more