Python math.isinf() နည်းလမ်း
ဥပမာ
တန်ဖိုးသည် အဆုံးမရှိ ဟုတ်မဟုတ် စစ်ဆေးပါ-
# Import math Library
import math
# Check whether the values are
infinite or not
print(math.isinf(56))
print(math.isinf(-45.34))
print(math.isinf(+45.34))
print(math.isinf(math.inf))
print(math.isinf(float("nan")))
print(math.isinf(float("inf")))
print(math.isinf(float("-inf")))
print(math.isinf(-math.inf))
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
နည်းလမ်း သည် math.isinf()
နံပါတ်တစ်ခု အနန္တရှိ၊ မရှိ စစ်ဆေးသည်။
သတ်မှတ်ထားသော နံပါတ်သည် အပေါင်း သို့မဟုတ် အနုတ်လက္ခဏာဖြစ်လျှင် ဤနည်းလမ်းသည် True ပြန်ပေးသည်၊ သို့မဟုတ်ပါက False ပြန်ပေးသည်။
အထားအသို
math.isinf(x)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
x | Required. The number to check |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | bool တန်ဖိုးတစ်ခု၊ x သည် အပြုသဘော သို့မဟုတ် အနုတ်လက္ခဏာ အဆုံးမရှိလျှင် မှန်လျှင် မှား သည် ။ |
---|---|
Python ဗားရှင်း- | ၂.၆ |