Introduction to Programming in C - part 9 - math.h - sin, cos, pow, sqrt functions

preview_player
Показать описание
The math.h library is introduced, which has many useful functions for doubles such as
z=pow(x,y);
where z gets the value of x to the power of y (x^y).

Other functions include
sqrt(x) - which gives the square root of x
sin(x) - which gives the sin of x
cos(x) - which gives the cosine of x

The library stdlib.h includes the function
abs(n1)
which returns the absolute value of an integer n1 - or modulus of n1 - it always returns a positive value. The equivalent function for doubles is fabs(x).
Рекомендации по теме
join shbcf.ru