0

I need to convert that formula in such a way that i can make the calculation by taking the input of radix and number from user

〖log〗_radix (number)=  (〖log〗_e (number))/(〖log〗_e (radix))
GhostCat
  • 137,827
  • 25
  • 176
  • 248
faliure1
  • 13
  • 4
  • Does this answer your question? [How to evaluate a math expression given in string form?](https://stackoverflow.com/questions/3422673/how-to-evaluate-a-math-expression-given-in-string-form) – Cardinal System Jan 27 '21 at 16:01
  • 1
    I doubt there's any engine that can convert your example. Best to make your own. – Spectric Jan 27 '21 at 16:03
  • 3
    What do you mean by "convert"? Are you asking for the java code that computes the result after asking the user for input? As the other folks rather think you want to take that formula, and have that parsed and evaluated and whatnot (which is orders of magnitudes more complicated) – GhostCat Jan 27 '21 at 16:06

1 Answers1

-1

Well, you could simply read the inputs similar to here. Then, just calculate the result.

Scanner input = new Scanner(System.in); 
double number = input.nextDouble();
double radix= input.nextDouble();

double result = Math.log(number) / Math.log(radix);
CodingTil
  • 447
  • 2
  • 16