Python math.frexp() Yöntem
Örnek
Bir sayının mantis ve üssünü bulun:
#Import math Library
import math
#Return mantissa and exponent
of numbers
print(math.frexp(4))
print(math.frexp(-4))
print(math.frexp(7))
Tanım ve Kullanım
Yöntem math.frexp()
, mantisi ve belirtilen bir sayının üssünü bir çift ( m , e ) olarak döndürür.
Bu yöntemin matematiksel formülü şudur: sayı = m * 2 **e .
Sözdizimi
math.frexp(x)
Parametre Değerleri
Parameter | Description |
---|---|
x | Required. A positive or negative number. If the value is not a number, it returns TypeError |
Teknik detaylar
Geri dönüş değeri: | x'intuple mantis ve üssünü bir çift (m,e) olarak temsil eden bir değer. Mantis, tamsayı olarak döndürülen kayan üs olarak döndürülür |
---|---|
Python Sürümü: | 2.6 |