Lines Matching refs:n1
55 static inline void bc_fast_mul(bc_num n1, size_t n1len, bc_num n2, size_t n2len, bc_num *prod) in bc_fast_mul() argument
57 const char *n1end = n1->n_value + n1len - 1; in bc_fast_mul()
79 static inline void bc_fast_square(bc_num n1, size_t n1len, bc_num *prod) in bc_fast_square() argument
81 const char *n1end = n1->n_value + n1len - 1; in bc_fast_square()
141 static void bc_standard_mul(bc_num n1, size_t n1len, bc_num n2, size_t n2len, bc_num *prod) in bc_standard_mul() argument
144 const char *n1end = n1->n_value + n1len - 1; in bc_standard_mul()
195 static void bc_standard_square(bc_num n1, size_t n1len, bc_num *prod) in bc_standard_square() argument
198 const char *n1end = n1->n_value + n1len - 1; in bc_standard_square()
243 bc_num bc_multiply(bc_num n1, bc_num n2, size_t scale) in bc_multiply() argument
248 size_t len1 = n1->n_len + n1->n_scale; in bc_multiply()
250 size_t full_scale = n1->n_scale + n2->n_scale; in bc_multiply()
251 size_t prod_scale = MIN(full_scale, MAX(scale, MAX(n1->n_scale, n2->n_scale))); in bc_multiply()
255 bc_fast_mul(n1, len1, n2, len2, &prod); in bc_multiply()
257 bc_standard_mul(n1, len1, n2, len2, &prod); in bc_multiply()
261 prod->n_sign = (n1->n_sign == n2->n_sign ? PLUS : MINUS); in bc_multiply()
271 bc_num bc_square(bc_num n1, size_t scale) in bc_square() argument
275 size_t len1 = n1->n_len + n1->n_scale; in bc_square()
276 size_t full_scale = n1->n_scale + n1->n_scale; in bc_square()
277 size_t prod_scale = MIN(full_scale, MAX(scale, n1->n_scale)); in bc_square()
280 bc_fast_square(n1, len1, &prod); in bc_square()
282 bc_standard_square(n1, len1, &prod); in bc_square()