Lines Matching defs:sdiv
183 BIGNUM *tmp,wnum,*snum,*sdiv,*res;
210 sdiv=BN_CTX_get(ctx);
214 if (sdiv == NULL || res == NULL) goto err;
218 if (!(BN_lshift(sdiv,divisor,norm_shift))) goto err;
219 sdiv->neg=0;
223 div_n=sdiv->top;
235 /* Get the top 2 words of sdiv */
236 /* div_n=sdiv->top; */
237 d0=sdiv->d[div_n-1];
238 d1=(div_n == 1)?0:sdiv->d[div_n-2];
252 if (BN_ucmp(&wnum,sdiv) >= 0)
258 bn_sub_words(wnum.d, wnum.d, sdiv->d, div_n);
274 * snum and sdiv to calculate a BN_ULONG q such that
275 * | wnum - sdiv * q | < sdiv */
358 l0=bn_mul_words(tmp->d,sdiv->d,div_n,q);
366 * two BN_ULONGs in the calculation of q, sdiv * q
367 * might be greater than wnum (but then (q-1) * sdiv
371 if (bn_add_words(wnum.d, wnum.d, sdiv->d, div_n))