Write a function "division" such that division(f,F) returns the quotient(s) and remainder of a polynomial f divided by an ordered tuple F of polynomials, where all polynomials live in a ring with an arbitrary number of variables. Z

asked 2020-02-23 00:21:55 +0200

Asma gravatar image

Since you don't know a priori the number of elements in F, one option is to pass F to your function as a list. You can get the length of the list with #F and you can access its entries with F_0, F_1, etc. Similarly, you can return the quotients in a list{q1,q2,...,qs}. There is a section on lists in the M2 documentation under The Macaulay2 Language -> lists and sequences.

edit retag flag offensive close merge delete



What is your question?

vdelecroix gravatar imagevdelecroix ( 2020-02-23 10:25:36 +0200 )edit

Homework ?

Note that nobody will do your homework for you...

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2020-02-26 10:11:34 +0200 )edit