# Singular

 Page 1 of 1 [ 3 posts ]
 Print view | E-mail friend Previous topic | Next topic
Author Message
 Post subject: A "syntax"/notation problemPosted: Thu Jan 16, 2014 10:46 am

Joined: Mon Jun 29, 2009 1:51 pm
Posts: 20
Version 3-1-6 gives me:
> 3x^2-3*x^2;
6x2

(And of course this difference between 3x^2 and 3*x^2 influences other computations, e.g. Milnor number etc.)
It is difficult to always remember, especially if one works with other computer systems. Could you correct this in the future version?

Thanks!

Top

 Post subject: Re: A "syntax"/notation problemPosted: Thu Jan 16, 2014 6:47 pm

Joined: Wed Mar 03, 2010 5:08 pm
Posts: 106
Location: Germany, Münster
Dmitry wrote:
Version 3-1-6 gives me:
> 3x^2-3*x^2;
6x2

Singular interprets 3x^2 as (3x)^2 which is 9*x^2, then the result 6x2 follows

Everything left from the ^ upto an * or + or - is taken as one token,
thus e.g. 2x2y^3 is 8*x^6*y^3;

Certainly a user should know this behaviour
but it seems to be a bit hidden in the manual.
Sadly, it is not stated precisely in the Getting started part:
http://www.singular.uni-kl.de/Manual/la ... .htm#SEC13

But see Section
6.4 Miscellaneous oddities
2. monomials and precedence
http://www.singular.uni-kl.de/Manual/3-1-6/sing_458.htm

To remember:
If the variable names consist only of single letters,
Singular allows to omit the * for the multiplication.
If one do so, then also one don't use the caret ^ for the exponentiation.

Conversely, if you use the long version with ^, then you should put the *, too.

Top

 Post subject: Re: A "syntax"/notation problemPosted: Sun Jan 19, 2014 8:17 am

Joined: Mon Jun 29, 2009 1:51 pm
Posts: 20
ok, thanks

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 3 posts ]

 You can post new topics in this forumYou can reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

 It is currently Fri Oct 19, 2018 2:43 am