Read-only forum archive

Q2: Odd behavior for poly input

Q2: Odd behavior for poly input

Justin C. Walker · Thu Aug 11, 2005 5:31 pm

Hi,

I don't get this:

> ring Fp=5,x,dp;
> poly f=7*x^3+9*x^2+8*x+3;
// ** redefining f **
> f;
2*x^3-x^2-2*x-2
> poly f=7x^3+9x^2+8x+3;
// ** redefining f **
> f;
-2*x^3+x^2-2*x-2

This is from 2.0.3 (Mac OS X 10.2.4). 'short=0' has been
entered.

The only difference between the two copies of 'f' is that
I didn't use the '*' between coefficient and indeterminate.

The second seems wrong to me, while the first seems correct.

Help!

Regards,

Justin


email: justin@mac.com
Posted in old Singular Forum on: 2003-04-10 03:36:32+02

Q2: Odd behavior for poly input

greuel · Thu Sep 08, 2005 11:48 am

As  7x^3 is not unique (there are no brackets) there must
be a default: 7x^3 = (7x)^3, 7*x^3 = 7*(x^3).

The reason is that in Singular 7x is a monomial (taken to
the 3rd power) while 7*x is 7 * the monomial x (taken to
the 3rd power).
To be on the safe side you can always use brackets.

This is explained in the Manual:
6.3 Miscellaneous oddities

Gert-Martin

email: greuel@mathematik.uni-kl.de
Posted in old Singular Forum on: 2003-04-15 22:21:56+02

Q2: Odd behavior for poly input

Justin C. Walker · Wed Sep 21, 2005 8:27 pm

> The reason is that in Singular 7x is a monomial (taken to
> the 3rd power) while 7*x is 7 * the monomial x (taken to
> the 3rd power).
> To be on the safe side you can always use brackets.

That's counter-intuitive. I guess I need to go back and read up on what a monomial is. I'd naturally expect '*' (implicit or not) to bind less tightly than '^'.

> This is explained in the Manual:
> 6.3 Miscellaneous oddities

I looked at this section, but just didn't make the connection.

Thanks for the clarification.

Regards,

Justin


email: justin@mac.com
Posted in old Singular Forum on: 2003-04-16 21:05:37+02