Python math.expm1() Metodo
Esempio
Trova il valore esponenziale di un numero - 1:
#Import math Library
import math
#Return the exponential value of
a number - 1
print(math.expm1(32))
print(math.expm1(-10.89))
Definizione e utilizzo
Il math.expm1()
metodo restituisce E x - 1.
'E' è la base del sistema naturale dei logaritmi (circa 2,718282) e x è il numero passato ad esso.
Questa funzione è più precisa di chiamare e sottrarre 1.
math.exp()
Sintassi
math.expm1(x)
Valori dei parametri
Parameter | Description |
---|---|
x | Required. Specifies the exponent |
Dettagli tecnici
Valore di ritorno: | Un float valore, che rappresenta E x - 1 |
---|---|
Versione Python: | 2.7 |