पायथन 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 |