On Wednesday, January 11, 2017 at 9:00:57 PM UTC+2, swapnil sharma wrote: > > @Kalevi thanx for response. > Actually, I wanted to make a program to form extended euclidean > representation of two polynomials(under a field ) so positive integral > coefficents is necessary as far as I can see. setting field =True was not > able to solve it. just out of curiosity, what effect does field =True > parameter have? >
By default, the coefficient domain will be the smallest domain containing the coefficients of the input polynomial expression. Setting field=True will force it to be the smallest field containing the coefficients, the field of rational numbers, in this case. > > On Wednesday, January 11, 2017 at 11:51:37 PM UTC+5:30, Kalevi Suominen > wrote: >> >> >> >> On Wednesday, January 11, 2017 at 6:29:40 PM UTC+2, swapnil sharma wrote: >>> >>> trunc(2*x**3 + 3*x**2 + 5*x + 7, 3) gives result : -x**3 - x + 1. is there >>> some way to get coefficents positive >>> instead of negative (i.e. here soln be like: 2*x**3+2*x+1)? >>> >>> >> One possibility is to write trunc(2*x**3 + 3*x**2 + 5*x + 7, 3, >> field=True) to avoid integer coefficients. Otherwise the current >> implementation will attempt to use representatives of least absolute value. >> > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/f956386b-1f9e-435c-a408-ae5e76122d82%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
