|
@ -227,4 +227,26 @@ double cube(double num) { |
|
|
|
|
|
|
|
|
double cubeRoot(double num) { |
|
|
double cubeRoot(double num) { |
|
|
return cbrt(num); |
|
|
return cbrt(num); |
|
|
|
|
|
}double factorial(double num) { |
|
|
|
|
|
if (num == 0) { |
|
|
|
|
|
return 1; |
|
|
|
|
|
} else { |
|
|
|
|
|
return num * factorial(num - 1); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
double power(double base, double exponent) { |
|
|
|
|
|
return pow(base, exponent); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
double sine(double angle) { |
|
|
|
|
|
return sin(angle * M_PI / 180.0); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
double cosine(double angle) { |
|
|
|
|
|
return cos(angle * M_PI / 180.0); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
double tangent(double angle) { |
|
|
|
|
|
return tan(angle * M_PI / 180.0); |
|
|
} |
|
|
} |