@sstadnicki No, it is more interesting:
Assume that we want to interpolate between two n-dimensional vectors of reals and the costs of a multiplication and an addition are m and a respectively. Then the cost of the first method is
(2m + a)n + a
and that of the second method is
(m + 2a)n.
This means that on very old hardware on which multiplication is an expensive operation, the second method is better. With modern floating-point processing, we have m = a and the methods are equivalent.
Here I have taken “costs” as something like the required time for the operation. If we take costs as energy consumption, then I think multiplication is still more expensive an the second method is still better.
=> More informations about this toot | View the thread | More toots from mrdk@mathstodon.xyz
=> View sstadnicki@mathstodon.xyz profile
text/gemini
This content has been proxied by September (3851b).