How to convert parsed equation to its source format?

I want to change the following equation:
11 x² - 484 x + 12358 to (11 * x ^ 2 - 484x) + 12358

  • Is there any package or builtin function to do that?

Note:
My use case is for JuMP package and I have a work around for it.

1 Like

It is not an equation, but a polynomial. I am assuming you meant ... = 0.

How is it represented in Julia? (note that is parsed as another variable)

How would you like to change it?

I am using JuMP package and NLobjective accepts this :(#= none:1 =# @NLobjective m Min (11 * x ^ 2 - 484x) + 12358) format, so I want to change this :(#= none:1 =# @NLobjective m Min 11 x² - 484 x + 12358) to the accepted format.