That won't work with the pretty printers, though. It would be better
to implement wrappers, like suggested at
https://code.google.com/p/sympy/issues/detail?id=3736#c3.

Aaron Meurer

On Tue, Feb 11, 2014 at 11:30 PM, Chris Smith <[email protected]> wrote:
> evaluate=False is the way to do this:
>
>>>> Pow(2, -S.Half, evaluate=False)
> 1/sqrt(2)
>>>> p=_
>>>> 3*p,p+1
> (3*sqrt(2)/2, sqrt(2)/2 + 1)
>
> Note that using the unevaluated power in an expression undoes the
> unevaluation; you can get by, perhaps, by making a symbol have that name.
>
>>>> p=Symbol(str(p))
>>>> 3*p,p+1
> (3*1/sqrt(2), 1/sqrt(2) + 1)
>
>
> On Monday, February 10, 2014 4:11:27 PM UTC-6, Mike Witt wrote:
>>
>> Is there any way to stop sympy from automatically
>> rationalizing denominators? In other words, to
>> make is so that 1/sqrt(2) returns 1/sqrt(2) rather
>> than sqrt(2)/2.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to