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