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

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

• To: pari-dev@list.cr.yp.to
• Subject: Re: divisors/factor problem in 2.4.0 (development CHANGES-1.1570)
• From: Phil Carmody <thefatphil@yahoo.co.uk>
• Date: Thu, 27 Jul 2006 02:45:15 -0700 (PDT)
• Delivery-date: Thu, 27 Jul 2006 12:12:24 +0200
• Mailing-list: contact pari-dev-help@list.cr.yp.to; run by ezmlm

```--- Phil Carmody <thefatphil@yahoo.co.uk> 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?

Phil

()  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
http://mail.yahoo.com

```