Browse Source

Added logarithm function for base 10 logarithmic calculations

remotes/origin/feature
fdai7782 11 months ago
parent
commit
0a09383b1e
  1. 9
      src/main/c/main_taschenrechner.c
  2. 2
      src/main/c/taschenrechner.h

9
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;

2
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();

Loading…
Cancel
Save