News for hackers. Stuff that matters.
Re:Fast Inverse Square Root by SoSoRoCoCo on Tuesday November 03, 2020 @10:52AM (#24980715)
Yes, that was the only "portable solution". I use quotes because we had to assert() the sizeof float with uint32_t in the code prologue (it is unlikely to be an issue now, but the code is 25 years old, so we stuck to the spirit of expecting compilers where C types could be a variety of sizes, not just the "conventional" sizes of today). Unions are defined, casting is very poorly defined, especially float<>int. There's a good link a few comments down.

There are no comments on this comment yet.