Re: [sympy] Re: Where can I find code, that evaluates add and multiplication operations?

2021-06-05 Thread Aaron Meurer
If you are talking about numerical evaluation, in SymPy, integers wrap Python integers, so the operations are done in Python itself. Floating point numbers wrap mpmath, so the code for those will be in the mpmath library. Aaron Meurer On Sat, Jun 5, 2021 at 4:06 PM David Bailey wrote: > > On 05/

Re: [sympy] Re: Where can I find code, that evaluates add and multiplication operations?

2021-06-05 Thread David Bailey
On 05/06/2021 17:09, Chris Smith wrote: Try follow from `Numbers.__add__` Since Python can handle arbitrary precision numbers, doesn't the final evaluation happen in Python? I have always assumed that to be the case.  E.g. 3*4*x*x is converted into 12*x*x by Python (where x is an instance of

[sympy] Re: Where can I find code, that evaluates add and multiplication operations?

2021-06-05 Thread Chris Smith
Try follow from `Numbers.__add__` /c On Saturday, June 5, 2021 at 7:21:57 AM UTC-5 michal.bozyd...@gmail.com wrote: > Hey, thank you. But *flatten* is executed only then, when argument is > symbol, like *2 * x * x* (i.e.). But where is code of numbers eval? > sobota, 5 czerwca 2021 o 14:01:46

[sympy] Re: Where can I find code, that evaluates add and multiplication operations?

2021-06-05 Thread Michał Pawłowski
Hey, thank you. But *flatten* is executed only then, when argument is symbol, like *2 * x * x* (i.e.). But where is code of numbers eval? sobota, 5 czerwca 2021 o 14:01:46 UTC+2 smi...@gmail.com napisał(a): > processing of args, I believe, is handled in Add.flatten and Mul.flatten > > /c > > On S

[sympy] Re: Where can I find code, that evaluates add and multiplication operations?

2021-06-05 Thread Chris Smith
processing of args, I believe, is handled in Add.flatten and Mul.flatten /c On Saturday, June 5, 2021 at 3:18:06 AM UTC-5 michal.bozyd...@gmail.com wrote: > Hi. > > Where can I find code, that evaluates *Add* and *Mul* operations on real > numbers? I've found the code in *Pow* file (sympy/core