数学,对我来说有点复杂

时间:2016-10-12 08:30:05

标签: math

所以我有一个数学问题,我需要在我的代码中使用它。 这样说:

630 ---> 10000
125 ---> 1000
230 ---> ??
can anyone help me solve this?
with an explanation maybe...

1 个答案:

答案 0 :(得分:0)

看起来左边乘以5意味着右边乘以10,因为125 * 5 = 625。我猜你不想要线性但指数连接,比如

y=10^log5(x) = pow( 10, log(x)/log(5) )
             = x*pow( 2, log(x)/log(5) )
             = x*pow(x, log(2)/log(5) )