Previous:Division ofpoly_ints, Up:Arithmetic onpoly_ints [Contents][Index]
poly_int arithmetic ¶There are tentative routines for other operations besides division:
Return true if we can calculate ‘a |b’ at compile time,storing the result inresult if so.
Also, ANDs with a value ‘(1 <<y) - 1’ or its inverse can betreated as alignment operations. SeeAlignment ofpoly_ints.
In addition, the following miscellaneous routines are available:
Return the greatest common divisor of all nonzero coefficients ina, or zero ifa is known to be zero.
Return a value that is a multiple of botha andb, whereone value is apoly_int and the other is a scalar. The resultwill be the least common multiple for some indeterminate values butnot necessarily for all.
Return a value that is a multiple of bothpoly_inta andpoly_intb, asserting that such a value exists. Theresult will be the least common multiple for some indeterminate valuesbut not necessarily for all.
When using this routine, please add a comment explaining why theassertion is known to hold.
Please add any other operations that you find to be useful.