Thingiverse
faster sqrt function for marlin in planner.ccp
9
Downloads
21
Likes
0
Makes
float SqrtAprox(float number) {//low in fat
unsigned long i;
float x, y;
y = number;
i = * ( long * ) &y;
i = 0x5f375a86 - ( i >> 1 );
y = * ( float * ) &i;
return number * y;
}
This is an alternate planner.ccp file that has a faster sqrt calc function. I don't know if it really speeds up planner.ccp but it does increase the performance of a sqrt to complete by 300%.
read here for more info http://forums.reprap.org/read.php?147,219210
I read about several methods bef
unsigned long i;
float x, y;
y = number;
i = * ( long * ) &y;
i = 0x5f375a86 - ( i >> 1 );
y = * ( float * ) &i;
return number * y;
}
This is an alternate planner.ccp file that has a faster sqrt calc function. I don't know if it really speeds up planner.ccp but it does increase the performance of a sqrt to complete by 300%.
read here for more info http://forums.reprap.org/read.php?147,219210
I read about several methods bef
Sign in to leave a comment
Sign in