Python - cmath.nanj Constant Last Updated : 01 Jun, 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.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 : Python3 # Python code to implement # the cmath.nanj constant # importing "cmath" # for mathematical operations import cmath # Print the value of nanj val = cmath.nanj print(val) Output: nanj Example #2: Python3 # Python code to implement # the cmath.nanj constant # importing "cmath" # for mathematical operations import cmath # use of cmath.nanj val = type(cmath.nanj) print(val) Output: <class 'complex'> Comment More infoAdvertise with us Next Article Python - cmath.infj Constant S SHUBHAMSINGH10 Follow Improve Article Tags : Python Practice Tags : python Similar Reads 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.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.inf Constant 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: 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.isnan() function cMath module contains a number of functions which is used for mathematical operations for complex numbers. The cmath.isnan() function is used to check whether the value is nan (Not a Number), or not. The value passed in this function can be int, float, and complex numbers. Syntax: cmath.isnan(x) Par 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 Like