Replies: 1 comment
-
Thanks for the message. The first one is possible. You can create two polynomials and multiply them together. The result would be an object that represents the result you print and the __toString() function would display it as you show. Unfortunately, there is no functionality to take a polynomial and break it into other objects, or to display it in expanded vs contracted formats. The class does not have an implantation of any polynomial division, and reducing a polynomial would require that. It wouldn’t be difficult, but I wouldn’t know how to handle any remainders if the division is not exact. Floating point values would almost always require managing remainders. |
Beta Was this translation helpful? Give feedback.
-
Hi there,
Sorry for my lack of math vocabulary, I'm french.
I need the Polynom part of this script, it's awesome, but would it be able to expand and to factorize expressions ?
Like if I give it (x+2)(x-5) it's able to create the polynom x²-3x-10.
And also if I give the polynom 3x²+5x it's able to give me x(3x+5)
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions