Re: [sympy] Q: codegen

2021-08-02 Thread Audrius-St
Aaron Meurer . Thank you for your reply and suggestions I've now opened an issue in the SymPy issue tracker regarding this matter. On Monday, August 2, 2021 at 3:42:55 PM UTC-4 asme...@gmail.com wrote: > The 1.0 is currently hard-coded in the C code printer > > https://github.com/sympy/sympy/bl

Re: [sympy] evalf and Integer

2021-08-02 Thread Aaron Meurer
sqrt(101010101).round(-2) gives 10100 as expected. The docstring states that it does decimal rounding, although I haven't played with it enough to confirm if this is actually the case. I think we should add some flags to the round() method. It would be useful to control whether the rounding is bas

Re: [sympy] Request for discussion on kind system

2021-08-02 Thread Oscar Benjamin
On Mon, 2 Aug 2021 at 22:24, Jonathan Gutow wrote: > > Is there a discussion page/tab attached to github wikis? If so, how do I find > it? I do have some questions/thoughts on this. Best place to start the discussion is here. Then the wiki page can be updated following the discussion (it can als

Re: [sympy] Request for discussion on kind system

2021-08-02 Thread Jonathan Gutow
Is there a discussion page/tab attached to github wikis? If so, how do I find it? I do have some questions/thoughts on this. Jonathan Dr. Jonathan Gutow Chemistry Department UW Oshkosh web: https://uwosh.edu/facstaff/gutow e-mail: gu...@uwosh.edu Ph: 920-424-1326 __

Re: [sympy] Q: codegen

2021-08-02 Thread Aaron Meurer
The 1.0 is currently hard-coded in the C code printer https://github.com/sympy/sympy/blob/aa538a209d66b45eb73d9579fa0d088fe0adf220/sympy/printing/c.py#L284. One way to fix this would be to make your own subclass of the printer class and define your own _print_Pow method. For context here, SymPy alw

[sympy] Q: codegen

2021-08-02 Thread Audrius-St
Hello, I have been using sympy codegen to export sympy code to C. In a new project, I've encountered the following issue of the form rhs_expr = x*(r*r*r)**(-1) is exported by codegen as y6 = x*1.0/(r*r*r); The "1.0" in the above expression has two issues for me: It is superfluous; and In

[sympy] Request for discussion on kind system

2021-08-02 Thread JSS95
Kind system was introduced to SymPy since version 1.8, but it is not fully implemented yet and it may be confusing to those who did not participate in its discussion. So I wrote a brief wiki page covering the basic idea : Kind system ยท sympy/sympy Wiki (github.com)