Skip to content
Related Articles
Open in App
Not now

Related Articles

Python – cmath.infj Constant

Improve Article
Save Article
Like Article
  • Last Updated : 28 May, 2020
Improve Article
Save Article
Like Article

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
My Personal Notes arrow_drop_up
Like Article
Save Article
Related Articles

Start Your Coding Journey Now!