4) Type-generic macro: If arg has type long double, sqrtl is called. Otherwise, if arg has integer type or the type double, sqrt is called. Otherwise, sqrtf is called. If arg is complex or imaginary, then the macro invokes the corresponding complex function (csqrtf, csqrt, csqrtl). C numerics library. Header declares a set of functions to compute common mathematical operations and transformations: Functions Trigonometric functions cos Compute cosine (function ).
C++ program to find Square Root of a Number
For calculate Square Root of a number we multiply number by 0.5 because square root of any number means power of 1/2 and 1/2=0.5. And one another method for this program is use sqrt() function it is pre-defined in math.h header file.
Dev C Math.h Sqrt 3
C++ program to find Square Root
Explanation of Code
pow() is a predefined function in math.h header file, it is used for calculate power of any number.
C++ program to find Square Root
Sqrt C++ Library
Explanation of Code
sqrt() is a predefined function in math.h header file, it is used for calculate square root of any number.