पायथन गणित। गामा () विधि
उदाहरण
विभिन्न संख्याओं का गामा फलन ज्ञात कीजिए:
# Import math Library
import math
# Return the gamma function for
different numbers
print(math.gamma(-0.1))
print(math.gamma(8))
print(math.gamma(1.2))
print(math.gamma(80))
print(math.gamma(-0.55))
परिभाषा और उपयोग
math.gamma()
विधि गामा फ़ंक्शन को एक संख्या पर लौटाती है ।
युक्ति: किसी संख्या का लघुगणक मान ज्ञात करने के लिए, math.lgamma()
विधि का प्रयोग करें।
वाक्य - विन्यास
math.gamma(x)
पैरामीटर मान
Parameter | Description |
---|---|
x | Required. A number to find the gamma function for. If the number is a negative integer, it returns a ValueError. If it is not a number, it returns a TypeError. |
टेक्निकल डिटेल
प्रतिलाभ की मात्रा: | xfloat . पर गामा फलन का प्रतिनिधित्व करने वाला मान |
---|---|
पायथन संस्करण: | 3.2 |