Python math.ldexp() နည်းလမ်း
ဥပမာ
x * (2**i) ၏ ပြန်တန်ဖိုး။
#Import math Library
import math
#Return value of x * (2**i)
print(math.ldexp(9, 3))
print(math.ldexp(-5, 2))
print(math.ldexp(15,
2))
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
method သည် math.frexp()math.ldexp()
၏ ပြောင်းပြန်ဖြစ်သည့် x နှင့် i ကိုပေးထားသော ဂဏန်းများ၏ x * (2**i) ကို ပြန်ပေး သည် ။
အထားအသို
math.ldexp(x, i)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
x | Required. A positive or negative number. If the value is not a number, it returns TypeError |
i | Required. A positive or negative number. If the value is not a number, it returns TypeError |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | x * (2**i) တန်ဖိုး၊ |
---|---|
Python ဗားရှင်း- | ၂.၆ |