Python - cmath.inf Constant Last Updated : 28 May, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report cMath module contains a number of functions which is used for mathematical operations for complex numbers. The cmath.inf Constant is used to get the floating-point positive infinity. Syntax: cmath.inf Returns: Return the value of positive infinity Below examples illustrate the use of above function: Example #1 : Python3 # Python code to implement # the cmath.inf constant # importing "cmath" # for mathematical operations import cmath # Print the positive infinity val = cmath.inf print(val) Output: inf Example 2: Python3 # Python code to implement # the cmath.inf constant # importing "cmath" # for mathematical operations import cmath # Print the negative infinity val = -cmath.inf print(val) Output: -inf Comment More infoAdvertise with us Next Article Python - cmath.e Constant S SHUBHAMSINGH10 Follow Improve Article Tags : Python Python math-library-functions Python Cmath-library Practice Tags : python Similar Reads Python - cmath.infj Constant cMath module contains a number of functions which is used for mathematical operations for complex numbers. The cmath.infj Constant is used to get the complex positive infinity. Syntax: cmath.infj Returns: Return the complex positive infinity. Below examples illustrate the use of above function: Exam 1 min read Python - cmath.e Constant cMath module contains a number of functions which is used for mathematical operations for complex numbers. The cmath.e Constant is used to get the eular's number. Syntax: cmath.e Returns: Return the e value. Below examples illustrate the use of above function: Example #1 : Python3 # Python code to i 1 min read Python | cmath.nan Constant cMath module contains a number of functions which is used for mathematical operations for complex numbers. The cmath.nan Constant is used to get the floating-point nan (Not a Number). Syntax: cmath.nan Returns: Return the floating-point nan value. Below examples illustrate the use of above function: 1 min read Python - cmath.nanj Constant cMath module contains a number of functions which is used for mathematical operations for complex numbers. The cmath.nanj Constant is used to get the complex nan (Not a Number). Syntax: cmath.nanj Returns: Return the complex nan value. Below examples illustrate the use of above function: Example #1 1 min read Python - cmath.cos() function cMath module contains a number of functions which is used for mathematical operations for complex numbers. The cmath.cos() function returns the cosine value of a complex number. The value passed in this function can be int, float, and complex numbers. Syntax: cmath.cos(x) Parameter:This method accep 1 min read Python - cmath.cosh() function cMath module contains a number of functions which is used for mathematical operations for complex numbers. The cmath.cosh() function returns the hyperbolic cosine value of a complex number. The value passed in this function can be int, float, and complex numbers. Syntax: cmath.cosh(x) Parameter:This 1 min read Like