Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Python – cmath.infj Constant

  • Last Updated : 28 May, 2020

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
Recommended Articles
Page :

Start Your Coding Journey Now!