Método Python math.exp()
Exemplo
Retorne 'E' elevado à potência de números diferentes:
#Import math Library
import math
#find the exponential of the
specified value
print(math.exp(65))
print(math.exp(-6.89))
Definição e uso
O math.exp()
método retorna E elevado à potência de x (E x ).
'E' é a base do sistema natural de logaritmos (aproximadamente 2,718282) e x é o número passado para ele.
Sintaxe
math.exp(x)
Valores de parâmetro
Parameter | Description |
---|---|
x | Required. Specifies the exponent |
Detalhes técnicos
Valor de retorno: | Um float valor, representando 'E' elevado à potência de x |
---|---|
Versão do Python: | 1.6.1 |