Open In App

Python – cmath.infj Constant

Improve
Improve
Like Article
Like
Save
Share
Report

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:

Example : 

Python3




# Python code to implement
# the cmath.infj constant
        
# importing "cmath"
# for mathematical operations  
import cmath 
    
# Print complex infinity
val = cmath.infj
print(val)


Output:

infj

Example 2:

Python3




# Python code to implement
# the cmath.infj constant
        
# importing "cmath"
# for mathematical operations  
import cmath 
    
# Print complex infinity
val = complex(cmath.infj)
print(val)


Output:

infj

Last Updated : 28 May, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads