diff --git a/src/c/funktionen.c b/src/c/funktionen.c index b069db3..64a3479 100644 --- a/src/c/funktionen.c +++ b/src/c/funktionen.c @@ -132,3 +132,14 @@ float radiansToDegrees(float x) { return x * (180 / M_PI); } +// Function to calculate the base 10 logarithm of a number and add 1 +float logarithmPlusOne(float x) { + if (x > 0) { + return log10(x) + 1; + } + else { + printf("Error: Invalid input for logarithm + 1!\n"); + return 0; + } +} +