by trogluddite on Thu Nov 17, 2011 6:09 am
No problem - I can't really take all the credit anyway, as the code was an my assembly optimisation, of another guys code, who ported an algorithm....
The ABSmask is just a very fast way to create the ABS(x) function - the integer has the lowest 31 bits all set to one, and the 32nd bit (sign bit) set to zero.
Because float numbers also use the top bit as the sign bit, when you do a bitwise ANS with any 32bit number, the sign bit will be masked out - turning negative numbers into positive ones.
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.