Python matematik.gamma() Yöntemi
Örnek
Farklı sayıların gama fonksiyonunu bulun:
# 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))
Tanım ve Kullanım
Yöntem math.gamma()
, gama işlevini bir sayıda döndürür.
İpucu: Bir sayının log gama değerini bulmak için math.lgamma()
yöntemi kullanın.
Sözdizimi
math.gamma(x)
Parametre Değerleri
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. |
Teknik detaylar
Geri dönüş değeri: | x'dekifloat gama işlevini temsil eden bir değer |
---|---|
Python Sürümü: | 3.2 |