Could this be doable in "string math"?
from:
https://qb64phoenix.com/qb64wiki/index.p...#Fast_Math
EDIT: I was responding to bplus saying something about "power" function being difficult to implement if it involves fractions, is that right? But this function might not be a solution because it seems to force a cast from double-precision to same-size integer. That first statement is ugly. :/
Code: (Select All)
double Fast_Pow(double a, double b) //fastpower originally developed by Martin Ankerl
{
int tmp = (*(1 + (int *)&a));
int tmp2 = (int)(b * (tmp - 1072632447) + 1072632447);
double p = 0.0;
*(1 + (int * )&p) = tmp2;
//p = p * a / 2.71828F ; failed attempt to auto correct the accuracy
return tmp;
}
from:
https://qb64phoenix.com/qb64wiki/index.p...#Fast_Math
EDIT: I was responding to bplus saying something about "power" function being difficult to implement if it involves fractions, is that right? But this function might not be a solution because it seems to force a cast from double-precision to same-size integer. That first statement is ugly. :/