Std::sqrt is required by the IEEE standard to be exact. The only other operations required to be exact are the arithmetic operators and the function std::fma. After rounding to the return type (using default rounding mode), the result of std::sqrt is indistinguishable from the infinitely precise result.
- Sqrt Function In C
- Sqrt Function In C++
- Sqrt Function In Dev C 5
- Sqrt Function In Java
- Sqrt Function In Dev C Calculator
- Related Questions & Answers
- Selected Reading
C++Server Side ProgrammingProgramming
Mathematical calculations can be done in C++ programming language using the mathematical functions which are included in math or cmath library. These mathematical functions are defined to do complex mathematical calculations. Let’s learn each of them one by one −
sine
The sin method is used to calculate the sin of the angle given as an argument in degrees. This function accepts one double integer as an argument and returns a double integer which is the value of sin(x°).
double sin(double)
Calling syntax
Example
![Sqrt Sqrt](/uploads/1/2/6/8/126871996/705232187.png)
Output
Cosine
The cosin or cos method is used to calculate the cos of the angle given as an argument in degrees. This function accepts one double integer as an argument and returns a double integer which is the value of cos(x°).
double cos(double)
Calling syntax
Example
Output
tangent
The tangent or tan method is used to calculate the tan of the angle given as an argument in degrees. This function accepts one double integer as an argument and returns a double integer which is the value of tan(xo) = sin(x°)∕cos(x°).
double tan(double)
Calling syntax
![Sqrt Function In Dev C++ Sqrt Function In Dev C++](/uploads/1/2/6/8/126871996/806700497.gif)
Example
Output
asin
The asin function is used to find the arc sine of the given argument. It returns the asin value for the given input set which can be any double integer within the range -1 to 1 otherwise it would give an error. The function accepts double integer between -1 and 1 and returns a double value as a result of asin().
double asin(double)
Calling syntax
Example
Output
acos
The acos function is used to find the arc cosine of the given argument. It returns the acos value for the given input set which can be any double integer within the range -1 to 1 otherwise it would give an error. The function accepts double integer between -1 and 1 and returns a double value as a result of acos().
double acos(double)
Calling syntax
Example
Output
atan
The atan function is used to calculate the value of arc tangent of the given argument. It returns a double value of atan for the double input value in the parameter.
double atan(double)
Calling syntax
Example
Output
cosh
The cosh function is used to calculate the value of hyperbolic cosine of the given argument. It returns a double value of cosh for the double input value in the parameter.
double cosh(double)
Calling syntax
Example
Output
Sqrt Function In C
sinh
Sqrt Function In C++
The sinh function is used to calculate the value of hyperbolic sin of the given argument. It returns a double value of sinh for the double input value in the parameter.
double sinh(double)
Calling syntax
Example
Output
tanh
Sqrt Function In Dev C 5
The tanh function is used to calculate the value of hyperbolic tangent of the given argument. It returns a double value of sinh for the double input value in the parameter.
double tanh(double)
Calling syntax
Example
Output
Power
The pow function is used to calculate the power of the base raised to the power of exponent. It accepts two double values as arguments which are the base and exponents numbers and it returns a single double integer which is base to the power of exponent.
double pow( double, double)
Calling syntax
Example
Output
Sqrt ( square root)
sqrt function in C++ returns the square root of the double integer inside the parameter list. The method accept a double integer value as input find square root and returns a double integer as output.
double sqrt( double)
Calling syntax
Example
Output
Log
The lock function is used to find the natural log of the given number. this method accepts single double integer value finds logarithmic value and returns a double integer result of log().
double log( double)
Calling Syntax
Example
Output
Floor
The floor function is used to return the floor value of the given double integer. floor value means rounded down value. the function accepts a double value as input and Returns double integer value calculated using floor().
double floor( double)
Calling Syntax
Example
Output
ceil
The ceil function is used to return the ceil value of the given double integer. ceil value means rounded up value. the function accepts a double value as input and Returns double integer value calculated using ceil().
double ceil( double)
Calling Syntax
Example
Output
abs
The abs function returns the absolute value of the integer value. The function accepts an integer value and returns an integer value that has the same magnitude but positive sign.
double abs( double)
Calling Syntax
Example
Output
- The C Standard Library
- C Standard Library Resources
- C Programming Resources
- Selected Reading
Description
The C library function double pow(double x, double y) returns x raised to the power of y i.e. xy.
Declaration
Following is the declaration for pow() function.
Parameters
- x − This is the floating point base value.
- y − This is the floating point power value.
Sqrt Function In Java
Return Value
This function returns the result of raising x to the power y.
Example
The following example shows the usage of pow() function.
Let us compile and run the above program that will produce the following result −
Sqrt Function In Dev C Calculator
math_h.htm