exp2() function in C++ STL
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....
read more
Number of ordered points pair satisfying line equation
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....
read more
log2() function in C++ with Examples
The function log2() of cmath header file in C++ is used to find the logarithmic value with base 2 of the passed argument....
read more
modf() in C/C++
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:...
read more
fabs() in C++
The fabs() function returns the absolute value of the argument. Mathematically |a|. If a is value given in the argument. Syntax:...
read more
trunc() , truncf() , truncl() in C language
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....
read more
Difference between ceil of array sum divided by K and sum of ceil of array elements divided by K
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....
read more
Represent Integer as sum of exactly X Powers of three. The powers can repeat
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....
read more
cosh() function in C++ STL
The cosh() is an inbuilt function in C++ STL which returns the hyperbolic cosine of an angle given in radians. Syntax :...
read more
tanh() function in C++ STL
The tanh() is an inbuilt function in C++ STL which returns the hyperbolic tangent of an angle given in radians....
read more
atanh() function in C++ STL
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:...
read more
islessgreater() in C/C++
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:...
read more