C++ Math ilogb()30 Aug 2024 | 1 min read The function returns the exponent part of a given number i.e integral part of logx. ilogb() function is equivalent to (int)logb() SyntaxParameterx: It is the value whose exponent is to be calculated. Return value
ExampleLet's see the simple example Output: Value of x is : 4 Exponent value of x is : 2 Next TopicC++ Math Functions |
math llround() function
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
math nexttoward() function
C++ Math toward() The toword() function represents the representable value in a specific direction. The after() and toward() both the functions work similar and return the same value. The only difference occurs in their syntax. Syntax float toward(float from, long double to); double toward(double from, long double to); long...
1 min read
math signbit() function
C++ Math signbit() The function checks whether the sign of a given number is negative or not. If the sign of a number is negative, it returns 1 otherwise 0. The signbit() function can also be applied to infinite, NAN and zero value. Syntax Suppose a number is 'x'.Syntax would...
2 min read
math modf() function
C++ Math modf() This function is used to divide a number into integral and fractional part. For example : 2.16 = 2 + 16 Syntax Suppose a number is 'x' and 'ptr' is the pointer to an integral part. float modf(float x, float* ptr); double modf(double x, double* ptr); long double modf(long double x,...
2 min read
math scalbn() function
C++ Math scalbn() The function computes the product of a given number and FLT_RADX raised to the power of exponent. Suppose a number is 'x' and exponent is 'n': scalbn(x,n) = x * ( FLT_RADX)n Syntax float scalbn(float x, int n); double scalbn(double x, int n); long double scalbn(long double x, int n); double...
1 min read
math tan() function
C++ Math tan() Function In the C++ programming language, the finds the tangent of an angle specified in terms of radians. It is part of the <cmath> header file. It can take arguments of type float, double, or long double, and return a value equivalent...
6 min read
math expm1() function
C++ Math expm1() The function computes the exponential 'e' raised to the power a given number minus 1. Suppose a number is 'x' expm1(x) = e<sup>x</sup> - 1; Syntax float expm1(float x); double expm1(double x); long double expm1(long double x); double expm1(integral x); Note: The return_type can be float, double or long double. Parameter x: It...
1 min read
math isinf() function
C++ Math isinf() The function determines whether the number is infinite or not. It can be positive or negative infinite. If the number is infinite, it returns 1 otherwise 0. Syntax Suppose a number is 'x'. Syntax would be: bool isinf(float x); bool isinf(double x); bool isinf(long double x); bool isinf(integral x); Parameter x:...
1 min read
math lround() function
C++ Math lround() This function is used to round off the given value and cast to long integer. Syntax Suppose a number is 'x'. Syntax would be: long int lround(data_type x); Parameter x: The value which can be either float or double. Return value It returns the rounded value of x. The return type...
1 min read
math hypot() function
C++ Vector hypot() This function finds the square root of the sum of the squares of two numbers. It stands for hypotenuse, is used to find the hypotenuse of a right angled triangle. Consider three numbers x,y and z : hypotenuse of a right angle triangle = √x2+y2 distance from...
1 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