v1.8.21
  • Solutions
    • Multiplatform
    • Server-side
    • Data science
    • Android
  • Docs
  • Community
  • Teach
  • Play
    • Playground
    • Hands-on
    • Examples
    • Koans
← 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
Kotlin™ is protected under the Kotlin Foundation and licensed under the Apache 2 license.
Supported and developed by JetBrains