Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道java中是否有一个函数可以找到反对数,或者我必须自己实现它?如果是这样,我该如何实施?
Math.exp(x)返回 e x。
Math.exp(x)
例子:
public static void main(String[] args) { System.out.println(Math.log(5)); // prints 1.6094... System.out.println(Math.exp(1)); // prints 2.7182... System.out.println(Math.exp(Math.log(5)); // prints 5.0000... }