Introduction

Note! This article is a short and slightly late followup to another short and very late investigation into the origin of the fast inverse square root function published as part of id Software's Quake3 source code release, 19th August 2005. Check out the original for the background to what's being discussed below.

Not done yet

float InvSqrt (float x){
    float xhalf = 0.5f*x;
    int i = *(int*)&x;
    i = 0x5f3759df - (i>>1);
    x = *(float*)&i;
    x = x*(1.5f - xhalf*x*x);
    return x;
}

The end of the original linked article above finished off with us opining about the author, saying that the last man we'd probably ever find that'd touched the code is Gary Tarolli, ex SGI, ex 3dfx, now at NVIDIA. After passing by coding luminaries such as John Carmack, Michael Abrash and Terje Mathison, attributing at least some part of it to Gary seemed pretty fitting given his history and contributions to modern 3D graphics, not least the fact he's a seriously good programmer too, and we left it at that.

Thinking that was it, we published and publicised and Slashdot picked it up, giving the piece some very hefty exposure. Exposure enough, it transpires, to have the real author say hello and own up to it. So it's not quite Gary, but rather another Silicon Valley veteran with a name beginning with G. Step forward, Greg Walsh.

Greg's been a veteran of the computing industry since the early 70s, his first big deals being working on Internet and distributed computing technologies since before it was even the Internet, and helping to engineer the first WYSIWYG word processor at Xerox PARC while at Stanford University. Following that, Greg helped found Ardent Computer, whose Wikipedia entry gives you more information on the company and its products than I possibly can.

Developing parallel graphics minicomputers using custom vector processors and then Intel i860 RISC vector processors (used in old NeXT boxes to run the graphics subsystem, as just one of that IC's uses), Ardent became Stardent after Kubota, the company funding Ardent at the time, forced a merger with Stellar, Ardent Computer's biggest competitor.

Ardent's Titan graphics minicomputer was having a hard time reaching its performance claims, and Greg initially engineered the fast 1/sqrt(x) as a means to speed up software running on the computer that couldn't utilise the vector hardware. At the time, Greg was working with Cleve Moler, MathWorks founder and author of MatLab, at Ardent. It's from working with Cleve that Greg got the initial seed of the idea to write the function. Cleve at the time was investigating using N-R iteration for approximation, and Greg also wrote 1/cuberoot(x) for the Titan in the same period using similar (but more complex) methods.

At the same time, Tarolli was also consulting for Kubota, so we get our lightbulb-above-head realisation about its movements into the published source, since Gary was also using it and tweaking it for his own uses at 3dfx, and you can trace 3dfx to id Software via Brian Hook at the very least. The rest, as they say, is history. Gary and Greg would further work together for Accel Graphics (Accel were eventually bought by Evans and Sutherland, yet another company named across these two pieces that you could write an entire 3D-based book about). I'm yet to collect an AccelSTAR of any kind, if anyone with a spare is reading!

So we end up adding Greg to the list of those who have written or touched the code over the years; we can rightfully name Cleve as the inspiration and Greg as the author; and now we can likely put the story to bed. Greg left the 3D game to start a business software company that successfully hit IPO to big fanfare in 1999, Kubota ended up producing add-in 3D boards for DEC workstations (the Denali is mostly a very rare collectors item now) before leaving 3D for good, and Cleve is still at Mathworks as its Chief Scientist and founder.

A big thanks to Greg for saying hello and passing on his information, and big thanks to Slashdot (and Geo for the slashvertising submission) since without the big publicity, Greg might never have seen the original article.

Comment

Feel like commenting? We'd love for you to do so here.