Lines Matching defs:sdiv
268 BIGNUM *tmp, *snum, *sdiv, *res;
284 sdiv = BN_CTX_get(ctx);
285 if (sdiv == NULL)
289 if (!BN_copy(sdiv, divisor))
291 norm_shift = bn_left_align(sdiv);
292 sdiv->neg = 0;
303 div_n = sdiv->top;
322 /* Get the top 2 words of sdiv */
323 d0 = sdiv->d[div_n - 1];
324 d1 = (div_n == 1) ? 0 : sdiv->d[div_n - 2];
342 * the first part of the loop uses the top two words of snum and sdiv
343 * to calculate a BN_ULONG q such that | wnum - sdiv * q | < sdiv
422 l0 = bn_mul_words(tmp->d, sdiv->d, div_n, q);
433 * the calculation of q, sdiv * q might be greater than wnum (but
434 * then (q-1) * sdiv is less or equal than wnum)
437 tmp->d[j] = sdiv->d[j] & l0;