Phil Carmody on Thu, 27 Jul 2006 12:12:24 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: divisors/factor problem in 2.4.0 (development CHANGES-1.1570)

--- Phil Carmody <> wrote:
> In some contexts, divisors(3)=[1], and factor(3)=[;] alas.
> Not had time to check other versions or anything.
> Once you have a value that refuses to factor, it 'infects' all other values
> it touches (so factor(round(broken*210.0))=[;] too).

> ? const=poly/pdiv[length(pdiv)]
> %63 = 3

Despite what it looks like, that's not 3. It's a polynomial.

I discovered this by taking its square root, and finding out 
that I was left with a +O(x^16) term.

? sqrt(const)
1.732050807568877293527446341 + O(x^16)

So my problem can be solved simply by using polcoeff to extract the Z element
from the Z[x] object.

The general form of t_POL/t_POL is a t_RFRAC. However, Pari is prepared 
to detect the situation where the division is an exact one or not and 
to output a t_POL instead in that case. Is there any reason why it should 
not also be prepared to recognise exact integer ratios too? 


()  ASCII ribbon campaign      ()    Hopeless ribbon campaign
/\    against HTML mail        /\  against gratuitous bloodshed

[stolen with permission from Daniel B. Cristofani]

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around