Post a reply
Username:
Note:If not registered, provide any username. For more comfort, register here.
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:
Font size:
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation of post
To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.
Confirmation code:
Enter the code exactly as it appears. All letters are case insensitive, there is no zero.
   

Topic review - Degree of polynomial wrt a variable
Author Message
  Post subject:  Re: Degree of polynomial wrt a variable  Reply with quote
deg can be called with an intvec as a second argument:
http://www.singular.uni-kl.de/Manual/latest/sing_225.htm#SEC265
Thus one can easily build a suitable command, e.g:
Code:
> proc vardeg(poly f, int n) { return(deg(f,leadexp(var(n)))); }
> ring rdp =0,(x,y),dp;
> poly f = x2+y3+x4y2+x5 +x2y;
> deg(f);
6
> vardeg(f,2);
3
> vardeg(f,1);
5
> // the proc makes an implicit check of the second argument for the variable number:
> vardeg(f,3);
   ? var number 3 out of range 1..2
   ? error occurred in or before ::vardeg line 1: ` return(deg(f,leadexp(var(n)))); `
   ? leaving ::vardeg
   skipping text from `;` error at token `)`
Post Posted: Sun Jan 20, 2019 7:56 pm
  Post subject:  Degree of polynomial wrt a variable  Reply with quote
How do you check the degree of a polynomial wrt a variable? deg(poly) seems to give the total degree.
Post Posted: Sat Jan 19, 2019 7:52 am


It is currently Fri May 13, 2022 10:59 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group