![]() |
|
![]() |
|
Famously the magic constant in the Quake engine that nobody remembers inventing. That article does say there’s an SSE instruction rsqrtss that is better. |
![]() |
|
Compare the integer square root algorithm used in "Spacewar!" [1]. So, even by 1960 it should have been possible to implement a square root step instructions for each bit, much like division or multiplication shifts, and progress from this to full-fledged automatic operations by the use of a sub timing network. (I guess, it really depends on the economics of the individual use case, whether the effort does pay off or not, as you would amass a few additional hardware modules to accomplish this.) [1] https://www.masswerk.at/spacewar/inside/insidespacewar-pt6-g... |
![]() |
|
If you wanted to expand the definition of “processor” to electromechanical contraptions, the Friden SRQ could perform square roots using just additions and shifts, with not a single electronic component other than a motor. And since you had to position the decimal points manually, it would _technically_ be an integer operation… Video: https://youtu.be/o44a1ao5h8w |
![]() |
|
Can't you use the sequence 1 + 3 + 5 + ... + 2k + 1 to get the integer square root of any integer number? It's basically the k of the nearest lower number to your number in this sequence.
|
![]() |
|
Can you explain your idea? Your algorithm is correct by definition, but doing this naively would be very slow (even for 32bit number). At this point it would be much faster to just binsearch it.
|
![]() |
|
another example is the virtualization that pretty much enabled the whole "cloud" thing came from mainframe architecture in the 60s. Intel and others brought it to consumer grade CPUs.
|
![]() |
|
It was called "inverse square root" as it is just another practical "layer" on top of "inverse" which is just meant to mean multiplicative inverse. This is the original Blinn 97 BTW. https://web.archive.org/web/20130309073539/http://rufus.hack... This seems to have been common usage. I never really thought about it as it was just so normal to refer to reciprocal as "inverse" in this context. > In my universe we used inverse in the context of functions and their inverses Yes but, the other type of inverse that is so fundamental to CS in general, and especially geometry is a matrix inverse, which is again a multiplicative inverse, so it's not too surprising how this usage became assumed in many contexts. |
The related FRSQRTE instruction is much more conventional, operating on 32-bit floats, again giving approximate inverse square root.