Fabs (x) >> Absolute Value of Floating / Double Number
Header File :
- Math.h
Name Stands for -
[Fabs = ‘F’ abs = “Float” Absolute ]
Syntax :
double fabs ( double x );
float fabs ( float x );
long double fabs ( long double x );No of Parameters : 1
Parameter : Long
Return Type : Long
What it Does ?
- The function fabs() returns the absolute value of Float.
- Labs calculates the absolute value of a Float , Double
Live Example :
#include < stdio.h>
#include < math.h>
int main(void)
{
float number = -1234.0;
printf("number: %f absolute value: %fn", number, fabs(number));
return 0;
}