Re: [sympy] Easy way to use S()

2023-07-03 Thread gu...@uwosh.edu
3e4 in sympy pretty printing is output as a decimal number. At somewhere greater that 10^10 pretty printing switches to scientific notation with a • in sympy. In the code cells I insist on using * for multiplication to avoid any questions about implicit multiplication and multi-character variab

Re: [sympy] Easy way to use S()

2023-07-03 Thread David Bailey
On 03/07/2023 14:44, gu...@uwosh.edu wrote: David, I want to make sure I understand the behavior you would prefer, because I think I can implement it in algebra-with-sympy . The package already does some pre-parsing, so I thi

Re: [sympy] Easy way to use S()

2023-07-03 Thread David Bailey
On 03/07/2023 13:24, Oscar Benjamin wrote: Another option is to call S with a string:: In [27]: s = '1 + x*(m + 1/2)/(2*m + 1) + x**2*(m + 1/2)*(m + 3/2)/(2*(2*m + 1)*(2*m + 2))' In [28]: print(S(s)) x**2*(m + 1/2)*(m + 3/2)/((2*m + 2)*(4*m + 2)) + x*(m + 1/2)/(2*m + 1) + 1 -- Oscar Thanks Os

Re: [sympy] Easy way to use S()

2023-07-03 Thread gu...@uwosh.edu
The documentation for isympy mode is not good. When I search the sympy docs I find this https://docs.sympy.org/latest/modules/interactive.html. I am do not find anything about the -i option on this page. A general web search turns up this old command line doc which also does not document the -

Re: [sympy] Easy way to use S()

2023-07-03 Thread gu...@uwosh.edu
David, I want to make sure I understand the behavior you would prefer, because I think I can implement it in algebra-with-sympy . The package already does some pre-parsing, so I think I could handle it there. Here is what I th

Re: [sympy] Easy way to use S()

2023-07-03 Thread Oscar Benjamin
On Mon, 3 Jul 2023 at 00:16, David Bailey wrote: > > On 02/07/2023 23:44, Oscar Benjamin wrote: > > On Sun, 2 Jul 2023 at 23:06, David Bailey wrote: > >> Dear Group, > >> > >> If I want to enter m+1/2, I define m as a symbol and write: > >> > >>m+S(1)/2. > >> > >> However if I have a complica