← Docs
kotlin-stdlib / kotlin.math / exp

exp

Common
JVM
JS
Native
1.2
fun exp ( x : Double ) : Double
(Common source) (JVM source) (JS source) (Native source)
fun exp ( x : Float ) : Float
(Common source) (JVM source) (JS source) (Native source)

Computes Euler's number e raised to the power of the value x .

Special cases:

  • exp(NaN) is NaN
  • exp(+Inf) is +Inf
  • exp(-Inf) is 0.0
Stay in touch:
  • Contributing to Kotlin
  • Releases
  • Press Kit
  • Security
  • Blog
  • Issue Tracker
  • Brand assets
  • Careers
Supported and developed by JetBrains .
Kotlin™ is protected under the Kotlin Foundation
and licensed under the Apache 2 license .