Python math.gamma() နည်းလမ်း
ဥပမာ
မတူညီသောဂဏန်းများ၏ gamma လုပ်ဆောင်ချက်ကိုရှာပါ
# 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()
နည်းလမ်းသည် ဂမ်မာလုပ်ဆောင်ချက်ကို နံပါတ်တစ်ခုဖြင့် ပြန်ပေးသည် ။
အကြံပြုချက်- နံပါတ်တစ်ခု၏ log 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. |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | x တွင် float gamma function ကိုကိုယ်စားပြုသောတန်ဖိုး |
---|---|
Python ဗားရှင်း- | ၃.၂ |