diff --git a/src/c/funktionen.c b/src/c/funktionen.c index b762515..6ec9a84 100644 --- a/src/c/funktionen.c +++ b/src/c/funktionen.c @@ -32,3 +32,13 @@ return cbrt(x); float absolute(float x) { return fabs(x); } + +// Function to calculate the logarithm (base 10) of a number +float logarithm(float x) { +if (x > 0) { +return log10(x); +} else { +printf("Error: Invalid input for logarithm!\n"); +return 0; +} +}