Next:Otherpoly_int arithmetic, Previous:wi arithmetic onpoly_ints, Up:Arithmetic onpoly_ints [Contents][Index]
poly_ints ¶Division ofpoly_ints is possible for certain inputs. The functionsfor division return true if the operation is possible and in most casesreturn the results by pointer. The routines are:
Return true ifa is an exact multiple ofb, storing the resultinquotient if so. There are overloads for various combinationsof polynomial and constanta,b andquotient.
Likemultiple_p, but also test whether the multiple is acompile-time constant.
Return true if we can calculate ‘trunc (a /b)’ at compiletime, storing the result inquotient andremainder if so.
Return true if we can calculate ‘a /b’ at compile time,rounding away from zero. Store the result inquotient if so.
Note that this is true if and only ifcan_div_trunc_p is true.The only difference is in the rounding of the result.
There is also an asserting form of division:
Assert thata is a multiple ofb and return‘a /b’. The result is apoly_int ifais apoly_int.
Next:Otherpoly_int arithmetic, Previous:wi arithmetic onpoly_ints, Up:Arithmetic onpoly_ints [Contents][Index]