We will learn about Arithmetic function in C programming language
In the C Programming language, the Arithmetic function is used for arithmetic calculations and manipulations.
The arithmetic function is used for the arithmetic purpose in C Language
abs(): This function returns the absolute value of an only integer.The absolute value of a number is always positive. abs() math function supports only integer value in C language and not any other datatype – float(fabs), double . #include<stdlib.h> header files are supported in this function.
Syntax
int abs(int x);
fabs(): This function returns the absolute value an only floating point value.The absolute value of a number is always positive only. fabs() maths function supported only floating point value in C language #include<math.h> header file supported of this function .
Syntax
double abs(double x);
labs(): This function returns the absolute value of an only long integer value. The absolute value of a number is always positive. labs() math function supports only long integer value in C language #include<math.h> header files are supported of this function .
Syntax
long int labs(long int x);
floor(): This function is the opposite of the ceil function and returns the nearest integer value which is less than or equal to the passing argument to this function(rounds dawns the nearest integer). This function include #include<math.h> header file
Syntax
double floor(double value);
ceil() : This function is opposite of the floor function and returns the nearest and smallest integer value which is greater than or equal(not less than) to the passing argument of this function. This function includes #include<math.h> header file
Syntax
double ceil(double value);
round() :This function returns the nearest integer value of the float or double or long double and passes the argument to the function.This function includes #include<math.h> header file
Syntax
double round(double value);
sin() : This function is use to calculate sine value. This function include #include<math.h> header file
Syntax
double sin(double value);
cos() : Thid function is used to calculate cosine value. This function includes #include<math.h> header file
Syntax
double cos(double value);
cosh() : This function calculates hyperbolic cosine value.This function includes #include<math.h> header file Read more
Syntax
double cosh(double value)
tan() : This function calculates tangent value.This function includes #include<math.h> header file
Syntax
double tan(double value);
tanh() : This function performs hyperbolic tangent value. This function includs #include<math.h> header file
Syntax
double tanh(double value);
sinh() : This function calculates hyperbolic sine value. This function includes #include<math.h> header file
Syntax
double sinh(double value);
exp() : This function calculates the exponential “e” to the nth power.This function includes #include<math.h> header file
Syntax
double exp(double value);
log(): This function calculates natural logarithm. This function includes #include<math.h> header file
Syntax
double log(double value);
log10() : This function is use to perform calculate base 10 logarithm. This function include #include<math.h> header file
Syntax
double log10(double value);
sqrt() : This function is used to find square root of the argument passed in this function. This function includes #include<math.h> header file. This function includes #include<math.h> header file
Syntax
double sqrt(double value);
pow() : This is used to find the power of given number. This function includes #include<math.h> header file
Syntax
double pow(double value1, double value2);
trunc() : This function truncates the decimal value from floating point value and returns integer value. This function includes #include<math.h> header file
Syntax
trunc(number,[decimal_places]);
Similar Functions
Other C programming language functions that are similar to the cosine function
User defined function in C language
Arithmetic functions in C Language
C# inverted full pyramid star pattern In this article, we will discuss the concept of…
C# Full Pyramid star pattern program In this article, we will discuss the concept of…
Program to count vowels, consonants, words, characters and space in Java In this article, we…
How to print multiplication table using Array in C++ language In this post, we will…
C Program to multiplication table using Array In this tutorial , we will discuss about…
Java program to check odd or even using recursion In this tutorial, we discuss a…