![]() |
VOOZH | about |
In Python, math module contains a number of mathematical operations, which can be performed with ease using the module. math.fabs() function returns the absolute value of the number.
Syntax: math.fabs(x) Parameter: x: This is a numeric expression. Returns: the absolute value of the number. Time Complexity: O(1) Auxiliary Space: O(1)
Code #1:
The fabs of 33.7 is : 33.7
Code #2:
math.fabs(-13.1) : 13.1 math.fabs(101.96) : 101.96