diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index 9158895..eb9dad3 100644 --- a/src/main/c/main_taschenrechner.c +++ b/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); +} diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index d177979..071fba0 100644 --- a/src/main/c/taschenrechner.h +++ b/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();