# Tag Archives: cpp-math

The expm1(x) function returns ex – 1 where x is an argument and e is mathematical constant with value equal to 2.71828. Syntax: double expm1()… Read More
The ldexp() function takes two arguments a and b and returns the product of a and 2 raised to the power of b i.e., a… Read More
This function is used to return the remainder(modulus) of 2 floating point numbers mentioned in its arguments and also stores the quotient to the pointer… Read More
In C++, isgreater() is a predefined function used for mathematical calculations. math.h is the header file required for various mathematical functions. isgreater() function used to… Read More
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… Read More
In C++, isgreaterequal() is a predefined function used for mathematical calculations. math.h is the header file required for various mathematical functions. isgreaterequal() function used to… Read More
fmax() and fmin() functions are defined in cmath header file. fmax() function: The syntax of this function is: double fmax (double x, double y); float… Read More
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… Read More
The fabs() function returns the absolute value of the argument. Mathematically |a|. If a is value given in the argument. Syntax: double fabs(double a); float… Read More
In C++, asin() and atan() is a predefined function used for mathematical calculations. math.h is the header file required for various mathematical functions. All the… Read More
The std::cbrt() is an inbuilt function in C++ STL which is used to calculate the cube root of number. It accepts a number as argument… Read More
The cmath header defines two more inbuilt functions for calculating square root of a number (apart from sqrt which takes double as an argument) which… Read More
Common mathematical functions std::fabs: This function returns the absolute value. std::sqrt: This function returns the square root std::sin: This function returns the sine measured in… Read More
All three functions are used to remove digits after decimal point and return the modified decimal number. trunc() : Truncates a double value after the… Read More
The math.h header defines various mathematical functions and one macro. All the functions available in this library take double as an argument and return double… Read More