Sunday, October 5, 2025
HomeLanguagesPython – cmath.infj Constant

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:

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
Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32337 POSTS0 COMMENTS
Milvus
86 POSTS0 COMMENTS
Nango Kala
6706 POSTS0 COMMENTS
Nicole Veronica
11871 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11936 POSTS0 COMMENTS
Shaida Kate Naidoo
6823 POSTS0 COMMENTS
Ted Musemwa
7089 POSTS0 COMMENTS
Thapelo Manthata
6779 POSTS0 COMMENTS
Umr Jansen
6779 POSTS0 COMMENTS