Python | math.fabs() function Last Updated : 20 Feb, 2023 Comments Improve Suggest changes Like Article Like Report 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: Python3 # Python code to demonstrate the working of fabs() # importing "math" for mathematical operations import math x = -33.7 # returning the fabs of 33.7 print ("The fabs of 33.7 is : ", end ="") print (math.fabs(x)) Output:The fabs of 33.7 is : 33.7 Code #2: Python3 # Python code to demonstrate the working of fabs() # importing "math" for mathematical operations import math # prints the fabs using fabs() method print ("math.fabs(-13.1) : ", math.fabs(-13.1)) print ("math.fabs(101.96) : ", math.fabs(101.96)) Output:math.fabs(-13.1) : 13.1 math.fabs(101.96) : 101.96 Comment More infoAdvertise with us Next Article Python | math.fabs() function S Shivam_k Follow Improve Article Tags : Python Python math-library-functions Practice Tags : python Similar Reads Python - math.asin() function Math module contains a number of functions which is used for mathematical operations. The math.asin() function returns the arc sine value of a number. The value passed in this function should be between -1 to 1. Syntax: math.asin(x) Parameter:This method accepts only single parameters. x :This param 2 min read Python | math.factorial() function In Python, math module contains a number of mathematical operations, which can be performed with ease using the module. math.factorial() function returns the factorial of desired number. Syntax: math.factorial(x) Parameter: x: This is a numeric expression. Returns: factorial of desired number. Time 2 min read Python | math.gcd() function In Python, math module contains a number of mathematical operations, which can be performed with ease using the module. math.gcd() function compute the greatest common divisor of 2 numbers mentioned in its arguments. Syntax: math.gcd(x, y) Parameter: x : Non-negative integer whose gcd has to be comp 2 min read Python math function | copysign() math.copysign() is a function exists in Standard math Library of Python. This function returns a float value consisting of magnitude from parameter x and the sign (+ve or -ve) from parameter y. Syntax : math.copysign(x, y) Parameters : x : Integer value to be converted y : Integer whose sign is requ 1 min read Python | math.copysign() function In Python, math module contains a number of mathematical operations, which can be performed with ease using the module. math.copysign(a, b) function return a float with the magnitude (absolute value) of a but the sign of b. Syntax: math.copysign(a, b) Parameter: a, b: numeric values. Returns: Return 1 min read Python | fsum() function fsum() is inbuilt function in Python, used to find sum between some range or an iterable. To use this function we need to import the math library. Syntax : maths.fsum( iterable ) Parameter : iterable : Here we pass some value which is iterable like arrays, list. Use : fsum() is used to find the sum 1 min read Python int() Function The Python int() function converts a given object to an integer or converts a decimal (floating-point) number to its integer part by truncating the fractional part.Example:In this example, we passed a string as an argument to the int() function and printed it.Pythonage = "21" print("age =", int(age) 3 min read Python oct() Function Python oct() function takes an integer and returns the octal representation in a string format. In this article, we will see how we can convert an integer to an octal in Python. Python oct() Function SyntaxSyntax : oct(x) Parameters: x - Must be an integer number and can be in either binary, decimal 2 min read Python | fmod() function fmod() function is one of the Standard math library function in Python, which is used to calculate the Module of the specified given arguments. Syntax: math.fmod( x, y ) Parameters: x any valid number (positive or negative). y any valid number(positive or negative). Returns: Return a floating point 2 min read modf() function - Python modf() function is an inbuilt function in Python that returns the fractional and integer parts of the number in a two-item tuple. Both parts have the same sign as the number. The integer part is returned as a float. Example:Pythonimport math # modf() function used with a positive number print("math. 3 min read Like