-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More rules in Evaluate #71
Comments
I'm currently experimenting with an alternative value type (see alternative-valuetype branch; A value of this new type is one of:
The explicit infinity values allow to handle infinity properly, what should resolve the mentioned issue. The inclusion of constants allows e.g. to return or handle pi nicely. However, it cannot represent e.g. negative pi this way and has to fall back to a real approximation. This somewhat reduces the usefulness of including constants in the first place, not sure yet whether to keep it. I've also noticed it cannot nicely represent non-real directed infinity like Let me know what you think about this. |
I love the new concept in that it makes it clearer and simpler to understand the product. However, I found that I didn't know the exact purpose of the modules. I am wondering what is the purpose of Approximation and Evaluation. Is the Approximation for arbitrary precision numbers, e.g. N function of Mathematica, in the end? Evaluation and Compilation are for machine precision numbers?
|
The modules typically just accompany a type, so the type is where the difference is. The distinct property of the Before we had the Approximation type, the parser used to interpret On the other hand, evaluate transforms expressions into a machine precision The Approximation module implements operations directly on Approximation instances, originally mainly to offload repetition from the Expression-related modules. The problem with this is that we cannot deal with e.g. infinity here properly and we cannot leverage it for evaluation and other use cases. |
NB: to answer the original question, it might be possible to leverage at least some of the existing Expression rules in evaluation by substituting the values first ( |
Very thanks for clear and lucid explanation. Now I can get a better understanding of the overall structure of the Symbolics. I am looking forward to new release with the NewValue. |
When evaluating
1/(1/d + a)
with d = 0.0 (and a = 2.0), it returns "not supported". Rational.simplify is required in order to get correct answer, 0.0. However, sometimes, the simplify is very time-consuming job for very long and complex expressions.Simply, by adding following ComplexInfinity-related rules in the Evaluate module, we can get correct answer.
In fact, Expression has many auto-simplification rules in invert, add, multiply and functions. Is there nice way to re-use the rules of Expression in Evaluate?
The text was updated successfully, but these errors were encountered: