You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having separate steps that specifically handle only symbolic and numerical computation is very limiting. The current plan wouldn't allow for partial evaluation of functions
>>> y = 2
>>> f(x, y) = x ^ 2 + y ^ 2
would return undefined with the current plan for the evaluator and approximator stages.
Proposed solution
Change the behavior of the evaluator to act like both the current evaluator and the approximator, removing the need for an approximator in the first place. The modify function would now return a (Expression, Option<Expression>) where the left value would be the simplest form while the right value would be an approximated form. If both are equal, then the right value would be a None, otherwise, it will hold the approximated value.
This would make the below examples of partial evaluation to become possible
>>> y = 1
>>> z = 1
>>> <x, y, z> dot <2, 2, 2>
(2 * x + 2 * y + 2 * z, Some(2 * x + 4))
>>> y = 2
>>> x ^ 2 + diff(y ^ 2, y)
(x ^ 2 + 2 * y, Some(x ^ 2 + 4))
while also in the long term, allowing for the functionality seen here where the exact form is returned but an approximate form is also given
This method could also allow for multiple fallbacks, such as if an integral is unable to be found symbolically, then the evaluator could fall back onto the approximated form of the integral (through various numeric integration methods such trapezoid, midpoint, simpsons, gauss legendre, gauss konrod, clenshaw curtis) to continue the evaluation.
The text was updated successfully, but these errors were encountered:
Reasoning
Having separate steps that specifically handle only symbolic and numerical computation is very limiting. The current plan wouldn't allow for partial evaluation of functions
would return undefined with the current plan for the evaluator and approximator stages.
Proposed solution
Change the behavior of the evaluator to act like both the current evaluator and the approximator, removing the need for an approximator in the first place. The
modify
function would now return a(Expression, Option<Expression>)
where the left value would be the simplest form while the right value would be an approximated form. If both are equal, then the right value would be aNone
, otherwise, it will hold the approximated value.This would make the below examples of partial evaluation to become possible
while also in the long term, allowing for the functionality seen here where the exact form is returned but an approximate form is also given

This method could also allow for multiple fallbacks, such as if an integral is unable to be found symbolically, then the evaluator could fall back onto the approximated form of the integral (through various numeric integration methods such trapezoid, midpoint, simpsons, gauss legendre, gauss konrod, clenshaw curtis) to continue the evaluation.
The text was updated successfully, but these errors were encountered: