New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integer raised to Float power does not evaluate #10063

Closed
cbm755 opened this Issue Oct 29, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@cbm755
Copy link
Contributor

cbm755 commented Oct 29, 2015

Rational raised to Float power does the right thing, but Integer raised to Float does not:

In [5]: 2**Float(3)
Out[5]: 2**3.0

In [6]: Rational(2, 3)**Float(3)
Out[6]: 0.296296296296296

I think the first result should do the same as

In [7]: Float(2)**Float(3)
Out[7]: 8.00000000000000

@cbm755 cbm755 added the core label Oct 29, 2015

cbm755 added a commit to cbm755/sympy that referenced this issue Oct 29, 2015

Integer raised to Float power should evaluate to Float
Previously it remained unevaluated.

Rational class has specific code to deal with Rational raised to
Float power, so we call Rational._eval_power() (our superclass).

Fixes sympy#10063

skirpichev added a commit to skirpichev/diofant that referenced this issue Jul 16, 2016

Integer raised to Float power should evaluate to Float
Previously it remained unevaluated.

Rational class has specific code to deal with Rational raised to
Float power, so we call Rational._eval_power() (our superclass).

Fixes sympy/sympy#10063

// edited by skirpichev

Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment