expm1

expect fun expm1(x: Double): Double(source)
expect fun expm1(x: Float): Float(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

Since Kotlin

1.2

See also

function.

actual inline fun expm1(x: Double): Double(source)
actual inline fun expm1(x: Float): Float(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

Since Kotlin

1.2

See also

function.

actual inline fun expm1(x: Double): Double(source)
actual inline fun expm1(x: Float): Float(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

Since Kotlin

1.2

See also

function.

actual external fun expm1(x: Double): Double(source)
actual external fun expm1(x: Float): Float(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

Since Kotlin

1.3

See also

function.