Answers for "how to do logarithms on java"

1

how to get logarithm in java

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
Posted by: Guest on April-24-2021
0

java code for logarithm

public static double log(double a)
Posted by: Guest on June-06-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language