【问题标题】:AS3 - math.pow and math.logAS3 - math.pow 和 math.log
【发布时间】:2013-10-09 08:35:00
【问题描述】:

我得到了以下数学问题。

var a = Math.pow(b, c);

我收到了 a 和 c。我怎样才能得到b?我的数学技能随着时间的推移而枯萎。

【问题讨论】:

  • 您是否要查找一个数字,该数字升为c,等于b?

标签: javascript actionscript-3 math logging pow


【解决方案1】:

var b = Math.pow(a, 1/c));

这是假设您不需要处理负数。

【讨论】:

  • 不过,这不会为您提供所有可能的解决方案。例如,2 ^ 2 = 4 和 (-2) ^ 2 = 4,但使用上面的答案只能得到 2。
猜你喜欢
  • 1970-01-01
  • 2015-04-11
  • 1970-01-01
  • 1970-01-01
  • 2020-01-10
  • 1970-01-01
  • 1970-01-01
  • 2012-04-11
  • 1970-01-01
相关资源
最近更新 更多