Drop main() prototype. Syncs with NetBSD-8
[minix.git] / minix / lib / libsys / sqrt_approx.c
blob07eeaec4f9517cbfea1284ff1fe2ac6c6c0f5012
1 #include <minix/sysutil.h>
3 u32_t sqrt_approx(u32_t in)
5 int b, v = 0;
6 for(b = (sizeof(in)*8)/2-1; b >= 0; b--) {
7 u32_t n = v | (1UL << b);
8 if(n*n <= in)
9 v = n;
12 return v;