Additional Topic. Built in Libraries
Additional Topic. Built in Libraries
• These functions are included in the <cmath> header file and allow you to
perform various mathematical operations, such as calculating square
roots, raising numbers to a power, and evaluating trigonometric functions.
sqrt
• The sqrt function is used to calculate the square root of a number. It takes
a single argument and returns the square root as a double value.
pow
• The pow function is used to raise a number to a power. It takes two
arguments: the base number and the exponent. It returns the result as a
double value.
sin and cos
• The sin and cos functions are used to calculate the sine and cosine of an
angle, respectively. These functions take the angle in radians as an
argument and return the corresponding sine or cosine value as a double
value.