C language Sin () function: sine function
header file:
The sin () function is used to find the sine value of a given value, and its prototype is:
The value given by the parameter (radians).
Return value returns the calculated result from 1 through 1.
The relationship between radians and angles is:
radians = 180/π angle
Angle =π/180 radians
Use the Rtod () function to convert radian values to angle values.
Note that when compiling with GCC, please join-LM.
Examples are as follows:
#include <stdio.h>
#include <math.h>
int main ()
{
printf ("7 ^ 3 =%f\n", pow (7.0, 3.0));
printf ("4.73 ^ =%f\n", pow (4.73, 12.0));
printf ("32.01 ^ 1.54 =%f\n", pow (32.01, 1.54));
return 0;
}
Output results:
7 ^ 3 = 343.000000
4.73 ^ a = 125410439.217423
32.01 ^ 1.54 = 208.036691
C language Sinh () function: hyperbolic positive and metaphysical functions
header file:
Sinh () is used to find hyperbolic sine, whose prototype is:
"Parameter" x is the value that is about to be computed.
The hyperbolic sine is defined as: (exp (x)-exp (-X))/2, i.e.
The hyperbola diagram is as follows:
Return value returns the hyperbolic positive value of the parameter x.
If the return value is too large, it returns HUGE_VAL, or Huge_valf, or huge_vall, with the same sign and X, causing a range overflow error and setting the global variable errno to Erange.
Note that when compiling with GCC, please join-LM.
Take a look at the following code:
#include <math.h>
Main () {
Double answer = sinh (0.5);
printf ("sinh (0.5) =%f\n", answer);
}
Output results:
C Language ASIN () function: The value of the inverse string (in radians)
header file:
To define a function:
Function Description: ASIN () is used to compute the inverse chord value of the parameter x, and then returns the result. The parameter x range is between 1 and 1 and will fail if it exceeds this range.
Return value: Returns the result of the calculation between the PI/2 of the-PI/2.
Error code: EDOM parameter x is out of range.
Note that when compiling with GCC, please join-LM.
Example
#include <math.h>
Main () {
double angle;
Angle = ASIN (0.5);
printf ("angle =%f\n", angle);
}
Perform