← Docs
kotlin-stdlib / kotlin.math / expm1

expm1

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

Computes exp(x) - 1 .

This function can be implemented to produce more precise result for x near zero.

Special cases:

  • expm1(NaN) is NaN
  • expm1(+Inf) is +Inf
  • expm1(-Inf) is -1.0

See Also

exp

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 .