Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can convert the floating point constants to rationals and use Sympy:

sage: y = var("y")
sage: a = 123.123
sage: b = 234234.123
sage: solve(QQ(a)^y==QQ(b), y, algorithm="sympy")
[y == (log(234234123) - 3*log(10))/(log(123123) - 3*log(10))]

It seems that Sympy can also provide a numerical solution if its domain is restricted:

sage: solve(a^y==b, y, algorithm="sympy", domain="real")
[y == 2.56879371128374]