42 int ndec = 0, slen = 0;
49 #if FIXEDPT_BITS == 32 51 #elif FIXEDPT_BITS == 64 56 else if (max_dec == -2)
66 tmp[ndec++] =
'0' + ip % 10;
71 str[slen++] = tmp[--ndec];
78 fr = (fr & mask) * 10;
83 }
while (fr != 0 && ndec < max_dec);
85 if (ndec > 1 && str[slen-1] ==
'0')
114 if (A < FIXEDPT_ONE && A > 6) {
130 for (i = 0; i < iter; i++)
fixedpt fixedpt_sqrt(fixedpt A)
char base
This version is stamped on May 10, 2016.
void fixedpt_str(fixedpt A, char *str, int max_dec)
Convert the given fixedpt number to a decimal string.
fixedpt fixedpt_log(fixedpt x, fixedpt base)
fixedpt fixedpt_pow(fixedpt n, fixedpt exp)
fixedpt fixedpt_ln(fixedpt x)
void __attribute__((noinline))
Convert the given fixedpt number to a decimal string.
static const uint32_t k[]
fixedpt fixedpt_tan(fixedpt A)
fixedpt fixedpt_exp(fixedpt fp)
#define fixedpt_fracpart(A)
fixedpt fixedpt_mul(fixedpt A, fixedpt B)
fixedpt fixedpt_sin(fixedpt fp)
fixedpt fixedpt_div(fixedpt A, fixedpt B)
char * fixedpt_cstr(const fixedpt A, const int max_dec)
fixedpt fixedpt_cos(fixedpt A)
#define fixedpt_rconst(R)
x
Return the smallest n such that 2^n >= _x.