Closed crowlogic closed 2 weeks ago
I just realized that the notion of quasi polynomial can be dropped altogether if the operations on the polynomial types are extended to taken to account the value of the remainder and the divisor that led to the remainder being attached to that particular polynomial value. Things carry and factor naturally therefore you don't have to deal with the proliferation of function compositions that you do if you're just generally ignoring the remainder and dealing with it in some other fashion
Objective: Refine the expression parser to include a unified representation that integrates remainders and divisors into the polynomial structure, with a specific emphasis on handling rational functions, particularly Lommel polynomials.
Details:
isIntegral
: Use a boolean to indicate whether a result is integral or has a remainder. This flag aids in the quick determination of the polynomial's state and streamlines subsequent operations.Example: Considering this:
$${\text{polynomial: } 0, \text{remainder: } x^2, \text{divisor: } x^2}$$
Which reduces to
$${\text{polynomial: } 0, \text{remainder: } 1, \text{divisor: } x}$$
Now multiply by x
$${\text{polynomial: } 0, \text{remainder: } x, \text{divisor: } x}$$
Which reduces to
$${\text{polynomial: } 1, \text{remainder: } 0, \text{divisor: } 1}$$
decompiled...
should be moved into a constant static field so as to remove the unnecessary parsing of the expression on each invocation of evaluate which is obviously not very efficient. it would be better to inline the hypergeometric expression code instead of relying on the use of HypergeometricPolynomial anyway