3 ms·
Or you could do ((46+23)^2 -(46-23)^2) / 4 Or one of several similar formulae, but each has its own pros and cons.
by shiandow 2y ago
Or you could do ((46+23)^2 -(46-23)^2) / 4
Or one of several similar formulae, but each has its own pros and cons.
- JadeNB 2y ago> Or you could do ((46+23)^2 -(46-23)^2) / 4 Sure, of course that works algebraically, though this method will always involve at least one bigger square, and division by 4, which, if working in base 10, can be implemented with exactly the computational complexity of multiplying by 25—so perhaps is also meant to be avoided, if we're trying to avoid multiplication! As you say, there are pros and cons of all approaches, including just doing the multiplication.
- shiandow 2y agoI mean the initial method is just ((46+23)/2)^2 - ((46-23)/2)^2 so you kind of need to be good at halving to use that method in the first place.