📜  如何在java代码示例中获取对数

📅  最后修改于: 2022-03-11 14:52:10.600000             🧑  作者: Mango

代码示例1
import java.lang.Math;
int y = 69;
double x = Math.log(y);   // this will return the log base e of a number

// for log base b (anything else from e)
double x = Math.log(y)/Math.log(b);   // this will return the log base b of a number