C++ Math fabs()
It computes the absolute value of a given number.
Suppose a number is 'x':
x: The value whose absolute value is to be determined.
It returns the absolute value of x.
Let's see the simple example when the value of x is positive.
Value of x is :11.2 Absolute value of x is : 11.2
In this example, fabs() function determines the absolute value of x=11.2.
Let's see the simple example when the value of x is negative.
Value of x is :-9.4 Absolute value of x is : 9.4
In this example, fabs() function computes the absolute value of x when the value of x is equal to -9.4.
JavaTpoint offers too many high quality services. Mail us on [email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected]
Duration: 1 week to 2 week