파이썬 cmath.isfinite() 메서드
예시
복소수 값이 유한한지 여부를 확인합니다.
#import cmath for complex number operations
import cmath
#find
whether a complex number is finite or not
print (cmath.isfinite(2 + 3j))
print (cmath.isfinite(complex(5.0,float('inf'))))
print
(cmath.isfinite(float('inf')+ 5j))
정의 및 사용
이 cmath.isfinite()
메서드는 복소수 값이 유한한지 여부를 확인합니다. 이 메서드는 부울 값을 반환합니다. True
값이 유한이면 False
.
통사론
cmath.isfinite(x)
매개변수 값
Parameter | Description |
---|---|
x | Required. The value to check if it is finite or not |
기술적 세부 사항
반환 값: | bool 값( 값이 유한 한 True 경우), 그렇지 않은 경우False |
---|---|
파이썬 버전: | 3.2 |