Skip to content

Instantly share code, notes, and snippets.

@Naramsim
Created January 28, 2015 20:45
Show Gist options
  • Save Naramsim/af59a3ac65043f95c591 to your computer and use it in GitHub Desktop.
Save Naramsim/af59a3ac65043f95c591 to your computer and use it in GitHub Desktop.
fastest rewrite of pow(..,2)
float f=...
if (*(int*)&f & 0x7FFFFFFF) {
*(int*)&f += n << 23;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment