CKTIS / Python
math.e
Fournit une approximation flottante du nombre d’Euler, base du logarithme naturel.
Version : Python 3.14; repository image, production runtime not attested
Syntaxe
math.eFournit une approximation flottante du nombre d’Euler, base du logarithme naturel.
L’arrondi à six décimales donne 2,718282. Son logarithme naturel vaut 1,0 à la précision du calcul.
Le float a une précision finie.
import math
assert isinstance(math.e, float) and 2.71 < math.e < 2.72
assert math.isclose(math.log(math.e), 1.0)
Exemples
import math
print(round(math.e, 6))
print(math.log(math.e))
Résultat
2.718282 1.0
Le float a une précision finie.