Skip to content

Instantly share code, notes, and snippets.

@liuliu
Created March 25, 2014 18:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liuliu/9767719 to your computer and use it in GitHub Desktop.
Save liuliu/9767719 to your computer and use it in GitHub Desktop.
static inline float cbrt_5_f32(float f)
{
const uint32_t b1 = 709921077;
uint32_t* p = (uint32_t*)(&f);
*p = *p / 3 + b1;
return f;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment