Allan MacLeod on Mon, 27 Oct 2014 10:57:04 +0100

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

A Strange problem

Over the weekend, I was developing some software in Pari which needs to check whether rational polynomials are squares over the rationals.


I used  isqsquare(polynomial,&root)


At the start of the program, everything worked fine and the roots, when found, were rational.


At a certain point, however, the roots changed to having real coefficients which completely screwed the code.


I got round the problem by writing my own “idiot” test subroutine, which works fine.


This problem occurred using Pari 2.7.2, Pari 2.6.0, and Pari 2.3.4.


Any suggestions as to what I did wrong?



Allan MacLeod

Please consider the environment and think before you print


University of the West of Scotland aims to have a transformational influence on the economic, social and cultural development of the West of Scotland and beyond by providing relevant, high quality, inclusive higher education and innovative and useful research.

Visit for more details

University of the West of Scotland is a registered Scottish charity. Charity number SC002520.


Legal disclaimer


The information transmitted is the property of the University of the West of Scotland and is intended only for the person or entity
to which it is addressed and may contain confidential and/or privileged material. Statements and opinions expressed in this e-mail may not represent those of the company. Any review, retransmission, dissemination and other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender immediately and delete the material from any computer.