diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index 20b7c33..9158895 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -39,8 +39,15 @@ double tangentFunction(double angle) { return tan(angle * M_PI / 180.0); } -// scientificmode +// Logarithmic functions +double logarithmFunction(double x) { + // Logarithm with base 10 + return log10(x); +} + + +// scientificmode int scientificMode(){ double num, result; diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index a2b16d0..d177979 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -15,6 +15,8 @@ double cosineFunction(double angle); double tangentFunction(double angle); +double logarithmFunction(double x); + int mode(int userChoice); int displayMenu();