John Cremona on Fri, 22 Dec 2017 13:55:55 +0100


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

Re: t_QUAD printed representation




On 21 December 2017 at 16:56, Sam Steingold <sds@gnu.org> wrote:
Hi,

--8<---------------cut here---------------start------------->8---
? quadunit(5)
%3 = w
? type(%3)
%4 = "t_QUAD"
? type(w)
%5 = "t_POL"
?
--8<---------------cut here---------------end--------------->8---

Sam: although the output of quadunit(5) -- which has type t_QUAD -- displays as 'w',  your first two lines do not assign a value to the identifier w, which does not exist until your 3rd command 'type(w)'.  Then it is created, and as with (more or less) any new variable name it is taken to be a new polynomial variable.

You might be less surprised by this (in the first line I assign the variable w to be the value which happens to also display as w):

? w=quadgen(5)
%1 = w
? type(%1)
%2 = "t_QUAD"
? type(w)
%3 = "t_QUAD"

John Cremona

 

how do I print the t_QUAD objects so that they can be read back?

Thanks.

--
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504
http://steingoldpsychology.com http://www.childpsy.net http://honestreporting.com
http://jij.org http://americancensorship.org http://camera.org
Life is like a diaper -- short and loaded.