C++ Math asinh()30 Aug 2024 | 2 min read The function computes the arc hyperbolic sine of an angle given in radian. Where, an arc of hyperbolic sine is the inverse of hyperbolic sine. sinh-1x = asinh(x); SyntaxSuppose an angle given in radian is 'x': Parameterx: The value whose arc hyperbolic sine is to be computed. Return valueThe function returns the arc hyperbolic sine of an angle given in radian. Example 1Let's see the simple example when the value of degree is integer type. Output: Value of degree is : 90 sinh(x) : 2.2993 asinh(x) : 1.23298 In this example, asinh() computes the arc hyperbolic sine of x and returns the value 1.23. Example 2Let's see the simple example when the value of degree is float type. Output: Value of degree is : 45.5 sinh(x) : 0.879727 asinh(x) : 0.727759 In this example, asinh() function computes the arc hyperbolic sine of x and returns the value 0.72. Next TopicC++ Math Functions |
C++ Math abs() The function finds the absolute value of a given number. Suppose a number is 'x': abs(x) = |x|; Difference between abs() and fabs() The abs() function does not support float or double type arguments while fabs() function supports float, double as well as integer type arguments. Syntax int abs( int...
1 min read
C++ Math logb() The function computes the logarithm of a given number, using FLT_RADX as base for the logarithm. Generally, FLT_RADX is equal to 2. Therefore, logb() is equivalent to log2(). Syntax Suppose a number is 'x'. Syntax would be: float logb(float x); double logb(double x); long double logb(long double x); double logb(integral x); Parameter x:...
2 min read
C++ Math cbrt() This function is used to find the cube root of a given number. Consider a argument 'arg' : Cube root of a number : ∛arg Syntax Syntax would be : double cbrt(double arg); float cbrt(float arg); long double cbrt(long double arg); double cbrt(integral arg); Parameter arg : It is the value of float or...
1 min read
C++ Math log() The function is used to find the natural logarithm (base-e logarithm) of a given number. Mathematically: Suppose 'x' is a given number: logex = log(x); Syntax float log(float x); double log(double x); long double log(long double x); double log(integral x); Parameter x: It is the value whose natural logarithm is to be calculated. Return...
2 min read
C++ Math after() The after() function represents the representable value in a specific direction. Suppose two numbers are 'from' and 'to'. Therefore, the after() function finds the value of 'from' in the direction of 'to'. Syntax float after( float from, float to); double after( double from, double to); long double...
2 min read
C++ Math atan() The function computes the inverse tangent of a number given in radian. atan(x) = tan-1x Syntax Suppose a number is 'x'. Syntax would be: float atan(float x); double atan(double x); long double atan(long double x); double atan(integral x); Note: If the value passed is an integer type, then it is cast to...
2 min read
C++ Math fmin() The function returns the minimum value between two numbers. Conditions: Consider two numbers 'x' and 'y'. If(x: It returns x. If(x>y): It returns y. If(x=nan): It returns y. If(y=nan):It returns x. Syntax float fmin(float x, float y); double fmin(double x, double y); long double fmin(long double x, long double y); promoted fmin(Arithmetic x, Arithmetic y); Note:...
1 min read
C++ Math llround() This function is used to round off the given value and cast to long long integer. Syntax Suppose a number is 'x'. Syntax would be: long long int llround(data_type x); Parameter x: The value that can be either double or float. Return value It returns the rounded value of x....
1 min read
C++ Math ilogb() The function returns the exponent part of a given number i.e integral part of logx. ilogb() function is equivalent to (int)logb() Syntax int ilogb(float x); int ilogb(double x); int ilogb(long double x); int ilogb(integral x); Parameter x: It is the value whose exponent is to be calculated. Return value Parameter Return value x=0 -INT_MIN x=NAN or +inf or...
1 min read
C++ Math acos() This function computes the inverse cosine of a number in radian. acos(x) = cos -1x Syntax Suppose a number is x. Syntax would be: float acos(float x); double acos(double x); long double acos(long double x); double acos(integral x); Note: If the value passed is an integer type, then it is cast to...
2 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India