Re: [sympy] What is_number means?

2021-06-05 Thread Aaron Meurer
It's supposed to mean that it can be evaluated to a numerical value with evalf(). I guess infinities are also considered numerical in this sense. Aaron Meurer On Sat, Jun 5, 2021 at 11:11 PM Paul Royik wrote: > > Why S.Infinity.is_number (as well as S.ComplexInfinity.is_number) is True and > S.

[sympy] What is_number means?

2021-06-05 Thread Paul Royik
Why S.Infinity.is_number (as well as S.ComplexInfinity.is_number) is True and S.NaN.is_number is True, while sin(S.Infinity) (i.e. AccumBounds) is False? I just can't understand what is_number means in SymPy. -- You received this message because you are subscribed to the Google Groups "sympy"

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

Re: [sympy] Rewriting with instance as rule

2021-06-05 Thread Chris Smith
> There are several different ways to rewrite one trig function in terms of another. The `fu` patterns can be used to do different types of rewriting. But in the case you gave, rewriting as cos, Pow or Mul might make sense. On Monday, May 17, 2021 at 3:26:36 AM UTC-5 JSS95 wrote: > I opene

[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

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

2021-06-05 Thread Michał Pawłowski
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/power.py). I know that there are move files in that dir: (sympy/core/add.py) (sympy/core/mul.py) But I cannot find the line of evaluation. I.E. where is code tha

[sympy] Introduction

2021-06-05 Thread Sharath Ravikumar
Hello guys, this is Sharath, I am a first year computer science student at Amrita University. I love to code and i am so excited to work with my favorite language - "Python". I have one year of experience working in python. My previous python projects include, plotting a covid variation graph a