We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is p_a_inv needed ? It has many branches and maybe not so good precision. p_inv is already fast.
Some platforms have hardware division that is faster than software division. I think we can either make an inline function like this
inline PAL_DIV(float a,float b){ #ifdef HAVE_DIV return a/b; #else /* compute inverse */ union { float f; uint32_t x; } u = {b}; /* First approximation */ u.x = 0x7EEEEBB3 - u.x; /* Refine */ u.f = u.f * (2 - u.f * cur); u.f = u.f * (2 - u.f * cur); u.f = u.f * (2 - u.f * cur); return a*u.f #endif }
and use it when division is needed or use division in every case and let the compiler to do the division
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is p_a_inv needed ? It has many branches and maybe not so good precision.
p_inv is already fast.
Some platforms have hardware division that is faster than software division.
I think we can either make an inline function like this
and use it when division is needed
or use division in every case and let the compiler to do the division
The text was updated successfully, but these errors were encountered: