> In fact I thought a CAS would default to this
> Chris's method works for my inline code methods (but wish they had global
variables there!).
Division of numeric literals is an hardcoded behavior of Python
interpreter, and a hardcoded behavior of Python language itself.
So it is not possible
OK--thank you to both of you for the advice. I think Jonathan's method is
inclined towards interactive use but allows global settings. Chris's method
works for my inline code methods (but wish they had global variables
there!).
Much appreciated
Fritz
On Fri, Oct 27, 2023 at 1:58 PM Chris Smith
Enter the exponent as `(S(1)/4)` or the power as `root(m*w, 4)`.
/c
On Thursday, October 26, 2023 at 9:16:53 PM UTC-5 sonn...@gmail.com wrote:
> In this simple string below, the result is a decimal. I have fooled a lot
> with the documentation but cannot see how to get my output as fractions
Within an IPython session this can be achieved with `sympy.interactive
.session.enable_automatic_int_sympification(*shell*)`. See the
documentation:
https://docs.sympy.org/latest/modules/interactive.html#module-sympy.interactive.
An alternative is to use Algebra_with_Sympy