طريقة 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))
التعريف والاستخدام
تُرجع math.ldexp()
الطريقة x * (2 ** i) للأرقام المعطاة x و i ، وهو معكوس
math.frexp () .
بناء الجملة
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) |
---|---|
نسخة بايثون: | 2.6 |