# Restricted usability of Singular after upgrade

Today I upgraded SageMath from 7.3 to 7.5.1, then I tried to continue yesterday's work: generating a sparse univariate polynomial using Singular, the polynomial has degree beyond that of toy polynomials. Yesterday, this worked fine, today I get the error message

exponent overflow (117649)

How can this happen? And what can I do to get the previous facilities of Singular (possibly, this means the previous facilities of SageMath)?

edit retag close merge delete

I think we'll need slightly more specific information to debug this. Perhaps a new Singular bug? The error sounds more like that of Singular - see https://groups.google.com/forum/#!top... which is probably it. I suspect this is your problem - hopefully someone else will answer here who knows how to allocate more memory for univariate.

( 2017-02-07 20:15:26 +0200 )edit

Sort by » oldest newest most voted

Meanwhile I made more experiments. The smallest polynomial degree forcing the error is 2^16. So I expect that the currently installed Singular version uses unsigned 16-bit words for exponents (and that the previous version had a larger representation, there I generated polynomials up to a degree of 27 bits then my computer was at the edge of its memory).

I had also a look on Singular's home page but I did not find any hint on technical restrictions or on internal data representation.

As workaround, I will try to re-install SageMath-7.3 from the Git repository. I hope the repository contains besides SageMath's core also the then actual external libraries.

It is a Singular problem since I misused Singular for its ability to handle sparse polynomials, also univariate ones (FLINT, NTL don't). The polynomial ring is created for a given prime number p by PolynomialRing(GF(p),1,"x"). The second argument 1 forces SageMath to switch to Singular.

The "bug" is not a bug, it is a restriction (16 bit exponents) implemented in Singular's official release. Unfortunately, Singular does not publish its restrictions (at least, I did not found one when reading its home page forth an back), so the violated restriction appeared as a bug. What about adding a comment in SageMath's documentation of PolynomialRing?

By contrast, version SageMath-7.3 included a modification of Singular where the restriction was set to 32 or 64 bit exponents, so the bug did not occur.

more

I should again point out the issue in the thread I linked to - this may be intentional, I'm not sure.

( 2017-02-08 13:10:52 +0200 )edit

On the one hand, 16-bit exponents seem to be intentional, i.e. intended by Singular. On the other hand, there is at least one Singular version that supports larger exponents. I do not understand who this version implemented (released as Singular version or implementation within SageMath only). Anyway, the version with larger exponents is not in the recent SageMath release.

( 2017-02-08 19:10:39 +0200 )edit

( 2017-02-09 14:00:27 +0200 )edit
1

Why would you think this is Singular problem? Univariate polynomials are not handled by Singular in Sage, they are handled by either Flint, or NTL, or Givaro (the latter for finite fields only). We need more info to track your issue down. E.g. could you at least tell us the output of type(f) for your polynomial f?

( 2017-02-09 21:05:41 +0200 )edit

Only thought Singular because of the similarity in errors. I agree the OP should give more details.

( 2017-02-09 21:37:35 +0200 )edit

It is a Singular problem since I misused Singular for its availability to handle sparse polynomials (FLINT, NTL don't). The polynomial ring is created for a given prime number 'p' by PolynomialRing(GF(p),1,'x') The second argument '1' forces SageMath to switch to Singular.

I cannot tell you the output of 'type(f)' since 'f' is not generated at all. For a polynomial of smaller degree the output is <type 'sage.rings.polynomial.multi_polynomial_libsingular.mpolynomial_libsingular'="">

The "bug" is not a bug, it is a restriction implemented in Singular's official release. Unfortunately, Singular does not publish its restrictions (at least, I did not found one when reading its home page forth an back), so it appeared as a bug.

( 2017-02-15 13:36:28 +0200 )edit

Thanks for the clarification - that is very helpful. You should add this to your answer, and then accept it yourself (if you can, otherwise a moderator can for you).

( 2017-02-15 17:40:44 +0200 )edit

I would like to "accept", but I do not know how to do (I do not see a button or the like named "accept").

( 2017-02-15 19:43:41 +0200 )edit

there is a little 'V' field under the answer score counter on the right, which one ticks to accept the answer. I just did it here.

( 2017-07-18 09:18:34 +0200 )edit