On 22 May 2017 at 07:21, Dmitry Timoshkov dmitry@baikal.ru wrote:
I guess that it's always possible to try justifying one way of doing math as a most preferred one. But in the case when one has to choose between "(a + b) * c" and "a * c + b * c" it's better to use common sense IMO. Since there are numerous ways how to compute linear blending, and every of them will always have subtle differences, is it really possible to plausibly explain a personal preference or justify some choice? Is there really "the true one" instead of considering every way having equal starting value?
Well, you're the one trying to justify changing the current code, but yes.
There's a trade-off between performance and accuracy here. As I said in my initial reply, I don't think it really matters one way or another here, but there may very well be other places where trading accuracy for performance would be a legitimate choice to make. You seem to be arguing that there's no trade-off at all instead. Even if that were true, and it isn't — please read up on floating point computation before continuing that line of argument, that wouldn't justify changing the code, or indeed even arguing about it.