@ -143,3 +143,14 @@ float logarithmPlusOne(float x) {
}
// Function to calculate the natural logarithm (base e) of a number and add 1
float naturalLogarithmPlusOne(float x) {
if (x > 0) {
return log(x) + 1;
else {
printf("Error: Invalid input for natural logarithm + 1!\n");
return 0;