Browse Source

Added naturalLogarithmFunction (ln) for natural logarithmic calculations

remotes/origin/feature
fdai7782 11 months ago
parent
commit
4e07ded997
  1. 5
      src/main/c/main_taschenrechner.c
  2. 5
      src/main/c/taschenrechner.h

5
src/main/c/main_taschenrechner.c

@ -44,6 +44,11 @@ double logarithmFunction(double x) {
// Logarithm with base 10
return log10(x);
}
double naturalLogarithmFunction(double x) {
// Natural logarithm (ln)
return log(x);
}

5
src/main/c/taschenrechner.h

@ -9,14 +9,19 @@ int multiply(int a, int b);
int divide(int a, int b);
// Trigonometric functions
double sineFunction(double angle);
double cosineFunction(double angle);
double tangentFunction(double angle);
//..
// Logarithmic functions
double logarithmFunction(double x);
double naturalLogarithmFunction(double x);
int mode(int userChoice);
int displayMenu();

Loading…
Cancel
Save