Python math.frexp() နည်းလမ်း
ဥပမာ
mantissa နှင့် ဂဏန်းတစ်ခု၏ ထပ်ကိန်းကို ရှာပါ
#Import math Library
import math
#Return mantissa and exponent
of numbers
print(math.frexp(4))
print(math.frexp(-4))
print(math.frexp(7))
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
နည်းလမ်း သည် math.frexp()
mantissa နှင့် သတ်မှတ်ထားသော နံပါတ်တစ်ခု၏ ထပ်ကိန်းအားအတွဲ ( m , e ) အဖြစ် ပြန်ပေးသည်။
ဤနည်းလမ်းအတွက် သင်္ချာဖော်မြူလာမှာ နံပါတ် = m*2 **e ဖြစ်သည်။
အထားအသို
math.frexp(x)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
x | Required. A positive or negative number. If the value is not a number, it returns TypeError |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | tuple mantissa နှင့် x ၏ ထပ်ကိန်းကို ကိုယ်စားပြုသော တန်ဖိုး တစ်ခု (m,e)။ Mantissa ကို float ထပ်ကိန်းအဖြစ် ကိန်းပြည့်အဖြစ် ပြန်ပေးသည်။ |
---|---|
Python ဗားရှင်း- | ၂.၆ |