简体   繁体   中英

How can I invert y = pow(x, z) to get x?

As I know there is no build-in functions to do this directly, so log()? or a simple math shortcut like:

z = y ** (1/x)

x?

If y=pow(x,z) then x = pow(y,1.0/z) :

>>> y = pow(3,1.7)
>>> y
6.473007839923779
>>> pow(y,1.0/1.7)
3.0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM