For what it's worth. I personally found some value in both
suggestions. I don't think I'm up to coding a "complete"
solution, but I ended up doing "enough" to solve my current
issue (involving some notebooks used for a study group)
by making an alternate version of the "latex" function.

-Mike

On 02/13/2014 06:05:42 PM, Aaron Meurer wrote:
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 <smi...@gmail.com> 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 sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> 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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
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