The exp2() is a builtin function in C++ STL that computes the base-2 exponential function of a given number. It can also be written as 2num....
Given an array of n integers, slope of a line i. e., m and the intercept of the line i.e c, Count the number of ordered pairs(i, j) of points where i ? j, such that point (Ai, Aj) satisfies the line formed with given slope and intercept....
The function log2() of cmath header file in C++ is used to find the logarithmic value with base 2 of the passed argument....
In C++, modf() is a predefined function used for mathematical calculations. math.h is the header file required for various mathematical functions. All the functions available in this library take double as an argument and return double as the result. modf() function breaks the given argument into two parts, one is integer and the other one is fractional. Integer part is stored in the memory address pointed by the pointer which is passed as second argument in the function and the fractional part is returned by the function. Syntax:...
The fabs() function returns the absolute value of the argument. Mathematically |a|. If a is value given in the argument. Syntax:...
All three functions are used to remove digits after decimal point and return the modified decimal number. trunc() : Truncates a double value after the decimal point and gives the integer part as the result. The return value and the arguments are of the type double....
Given an array arr[] and an integer K, the task is to find the absolute difference between the ceil of the total sum of the array divided by K and the sum of the ceil of every array element divided by K....
Given two integers N and X (1<=N<=X<=1e9), the task is to find if it is possible to represent N as exactly X powers of 3....
The cosh() is an inbuilt function in C++ STL which returns the hyperbolic cosine of an angle given in radians. Syntax :...
The tanh() is an inbuilt function in C++ STL which returns the hyperbolic tangent of an angle given in radians....
The atanh() is an inbuilt function in C++ STL that returns the inverse hyperbolic tangent of an angle given in radians. The function belongs to <cmath> header file.Syntax:...
In C++, islessgreater() is a predefined function used for mathematical calculations. math.h is the header file required for various mathematical functions.islessgreater() function is used to check whether the 1st argument given to the function is less than or greater than the 2nd argument given to the function or not. Means if a is the 1st argument and b is the 2nd argument then it check whether a>b || a<b or not.Syntax:...