Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1329 by five9a2: ccode: fractions use integer division when not  
intended
http://code.google.com/p/sympy/issues/detail?id=1329

Consider the example

>>> ccode((2*tau)**Rational(7,2))
     '8*pow(2,(1/2))*pow(tau,(7/2))'

Here, pow(2,(1/2)) = pow(2,0) = 1.  In fact, the whole expression evaluates
to 8*pow(tau,3) which is presumably not what was intended.

Also,

>>> ccode(sqrt(x))
     'pow(x,(1/2))'

evaluates to 1 which is not expected.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

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

Reply via email to