Coder Social home page Coder Social logo

Comments (7)

tthsqe12 avatar tthsqe12 commented on August 17, 2024 1

This one doesn't look too bad to fix. While I am installing 3.1.3, could you, @F-Feng, change the string in fmpz_mpoly_set_str_pretty to the more wieldy factored form you just displayed?
It is highly unlikely the set_str function has a bug.

from flint.

albinahlback avatar albinahlback commented on August 17, 2024

That's a long polynomial! Can you print the exact error message you get? What version of FLINT are you using?

It shouldn't error inside fmpz_mpoly_pfrac_init. I suspect fmpz_mpoly_set_str_pretty is wrong in that case.

from flint.

F-Feng avatar F-Feng commented on August 17, 2024

Apologies for the lengthy polynomial. I encountered this issue during my research, which is why I have included the entire polynomial here.

I am using flint-3.1.3, and the complete error message from the terminal appears as follows:

Flint exception (General error):
    fmpz_mpoly_pfrac_init: internal errorAborted (core dumped)

PS: The function fmpz_mpoly_set_str_pretty returns 0, indicating that fmpz_mpoly_set_str_pretty may work in this case.

from flint.

albinahlback avatar albinahlback commented on August 17, 2024

Not sure if we will be able to solve this quickly. If you are able to answer these questions, it could be helpful in investigating this:

  • Where does this polynomial arise?
  • Do you know of any characteristics of this polynomial? (For instance, I think I see that it is not a homogeneous polynomial)
  • Have you checked if fmpz_mpoly_set_str_pretty yields the correct output? (The initialization should always work, but just to make sure that this indeed is the problematic representation of this polynomial for fmpz_mpoly_pfrac_init)

from flint.

F-Feng avatar F-Feng commented on August 17, 2024

Thank you for your response. Please take your time. I hope the following information may be helpful.

  • The polynomial arises from my calculations of certain Feynman diagrams in Particle Physics, which often result in lengthy polynomials.
  • I suspect that these polynomials do not exhibit any specific characteristics and are generally non-homogeneous.
  • After using fmpz_mpoly_set_str_pretty, I verified the output with fmpz_mpoly_get_str_pretty and obtained the correct result.

from flint.

F-Feng avatar F-Feng commented on August 17, 2024

By the way, here is the factorized output for the polynomial:

from flint.

F-Feng avatar F-Feng commented on August 17, 2024

@tthsqe12 Thanks a lot, and here is the string in the factored form,

"-((-1+x3+x4)^2*(x3+x4)*(-x1+x1^2-x2+x1*x2+x2*x3+x2*x4)*(-(x1*x2*x3)+x1^2*x2*x3-x2^2*x3+x1*x2^2*x3-2*x2*x3^2+3*x1*x2*x3^2-x1^2*x2*x3^2+4*x2^2*x3^2-x1*x2^2*x3^2+2*x2*x3^3-2*x1*x2*x3^3-3*x2^2*x3^3+2*x1^2*x4-4*x1^3*x4+2*x1^4*x4+3*x1*x2*x4-7*x1^2*x2*x4+4*x1^3*x2*x4+x2^2*x4-3*x1*x2^2*x4+2*x1^2*x2^2*x4+x1*x3*x4-2*x1^2*x3*x4+x1^3*x3*x4-3*x2*x3*x4-x1*x2*x3*x4+4*x1^2*x2*x3*x4+3*x2^2*x3*x4+3*x1*x2^2*x3*x4+5*x2*x3^2*x4-5*x1*x2*x3^2*x4-6*x2^2*x3^2*x4+x1*x4^2-2*x1^2*x4^2+x1^3*x4^2-x2*x4^2-4*x1*x2*x4^2+5*x1^2*x2*x4^2-x2^2*x4^2+4*x1*x2^2*x4^2+4*x2*x3*x4^2-4*x1*x2*x3*x4^2-3*x2^2*x3*x4^2+x2*x4^3-x1*x2*x4^3)*x5^2)"

from flint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.