Yes, this was a bug that was recently fixed in SymPy.

Unfortunately, it was not fixed to give a positive answer in this
case.  But for the product of rational numbers to rational powers,
they are automatically put into a canonicalized form, so unless they
explicitly look rational (this can be checked programmatically with
.is_Rational), they aren't.  The exception is if one of the bases is
very large, so large that we do not attempt to factorize it due to the
potential time complexity.

For expressions containing more than this, there is no algorithm
implemented, and no simple way to check either.

Aaron Meurer

On Thu, Mar 1, 2012 at 7:22 AM, Sergiu Ivanov
<unlimitedscol...@gmail.com> wrote:
> On Thu, Mar 1, 2012 at 3:52 PM, prateek papriwal
> <papriwalprat...@gmail.com> wrote:
>> in sympy
>>
>>>>>sqrt(3).is_rational
>> TRUE
>>
>> this is wrong ..
>
> Which version of SymPy are you doing this in?
>
> For me,
>
>  In [12]: sqrt(3).is_rational
>
>  In [13]: print(sqrt(3).is_rational)
>  None
>
> Given that
>
>  $ ./bin/isympy --version
>  0.7.1-git
>
> Sergiu
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To post to this group, send email to sympy@googlegroups.com.
> To unsubscribe from this group, send email to 
> sympy+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sympy?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to