How can you easily calculate the square root of an unsigned long long in C? -


i looking @ question (here) looking way square root of 64 bit integer in x86 assembly.

this turns out simple. solution convert floating point number, calculate sqrt , convert back.

i need similar in c when equivalents i'm getting little stuck. can find sqrt function takes in doubles. doubles not have precision store large 64bit integers without introducing significant rounding error.

is there common math library can use has long double sqrt function?

function sqrtl(), taking long double, part of c99.

note compilation platform not have implement long double 80-bit extended-precision. required wide double, , visual studio implements plain double. gcc , clang compile long double 80-bit extended-precision on intel processors.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -