Lines Matching defs:numerator
156 * r, such that q * d + r is equal to the numerator.
226 * BN_div_internal computes quotient := numerator / divisor, rounding towards
228 * the numerator. Thus:
230 * quotient->neg == numerator->neg ^ divisor->neg (unless result is zero)
231 * remainder->neg == numerator->neg (unless the remainder is zero)
237 BN_div_internal(BIGNUM *quotient, BIGNUM *remainder, const BIGNUM *numerator,
251 if (numerator->top > 0 && numerator->d[numerator->top - 1] == 0) {
265 if (BN_ucmp(numerator, divisor) < 0) {
267 if (!bn_copy(remainder, numerator))
294 if (!BN_lshift(snum, numerator, norm_shift))
344 r_neg = numerator->neg ^ divisor->neg;
411 * Keep a copy of the neg flag in numerator because if
412 * remainder == numerator, BN_rshift() will overwrite it.
414 int neg = numerator->neg;
434 BN_div(BIGNUM *quotient, BIGNUM *remainder, const BIGNUM *numerator,
439 ct = BN_get_flags(numerator, BN_FLG_CONSTTIME) != 0 ||
442 return BN_div_internal(quotient, remainder, numerator, divisor, ctx, ct);
447 BN_div_nonct(BIGNUM *quotient, BIGNUM *remainder, const BIGNUM *numerator,
450 return BN_div_internal(quotient, remainder, numerator, divisor, ctx, 0);
454 BN_div_ct(BIGNUM *quotient, BIGNUM *remainder, const BIGNUM *numerator,
457 return BN_div_internal(quotient, remainder, numerator, divisor, ctx, 1);