Package-level declarations

Mathematical functions and constants.

The functions include trigonometric, hyperbolic, exponentiation and power, logarithmic, rounding, sign and absolute value.

Mathematical functions and constants.

The functions include trigonometric, hyperbolic, exponentiation and power, logarithmic, rounding, sign and absolute value.

Mathematical functions and constants.

The functions include trigonometric, hyperbolic, exponentiation and power, logarithmic, rounding, sign and absolute value.

Mathematical functions and constants.

The functions include trigonometric, hyperbolic, exponentiation and power, logarithmic, rounding, sign and absolute value.

Properties

Link copied to clipboard
expect val Int.absoluteValue: Int
expect val Long.absoluteValue: Long

Returns the absolute value of this value.

Since Kotlin 1.2
actual val Int.absoluteValue: Int
actual val Long.absoluteValue: Long

Returns the absolute value of this value.

Since Kotlin 1.2
actual val Int.absoluteValue: Int
actual val Long.absoluteValue: Long

Returns the absolute value of this value.

Since Kotlin 1.2
actual val Int.absoluteValue: Int
actual val Long.absoluteValue: Long

Returns the absolute value of this value.

Since Kotlin 1.3
Link copied to clipboard
const val E: Double = 2.718281828459045

Base of the natural logarithms, approximately 2.71828.

Since Kotlin 1.2
Link copied to clipboard
const val PI: Double = 3.141592653589793

Ratio of the circumference of a circle to its diameter, approximately 3.14159.

Since Kotlin 1.2
Link copied to clipboard
expect val Double.sign: Double
expect val Float.sign: Float
expect val Int.sign: Int
expect val Long.sign: Int

Returns the sign of this value:

Since Kotlin 1.2
actual val Double.sign: Double
actual val Float.sign: Float
actual val Int.sign: Int
actual val Long.sign: Int

Returns the sign of this value:

Since Kotlin 1.2
actual val Double.sign: Double
actual val Float.sign: Float
actual val Int.sign: Int
actual val Long.sign: Int

Returns the sign of this value:

Since Kotlin 1.2
actual val Double.sign: Double
actual val Float.sign: Float
actual val Int.sign: Int
actual val Long.sign: Int

Returns the sign of this value:

Since Kotlin 1.3
Link copied to clipboard
expect val Double.ulp: Double

Returns the ulp (unit in the last place) of this value.

Since Kotlin 1.2
actual val Double.ulp: Double

Returns the ulp (unit in the last place) of this value.

Since Kotlin 1.2
actual val Double.ulp: Double

Returns the ulp (unit in the last place) of this value.

Since Kotlin 1.2

Returns the ulp of this value.

Since Kotlin 1.2
actual val Double.ulp: Double

Returns the ulp (unit in the last place) of this value.

Since Kotlin 1.3
Since Kotlin 1.3

Functions

Link copied to clipboard
expect fun abs(x: Double): Double
expect fun abs(x: Float): Float

Returns the absolute value of the given value x.

Since Kotlin 1.2
expect fun abs(n: Int): Int
expect fun abs(n: Long): Long

Returns the absolute value of the given value n.

Since Kotlin 1.2
actual inline fun abs(x: Double): Double
actual inline fun abs(x: Float): Float

Returns the absolute value of the given value x.

Since Kotlin 1.2
actual fun abs(n: Int): Int
actual fun abs(n: Long): Long

Returns the absolute value of the given value n.

Since Kotlin 1.2
actual inline fun abs(x: Double): Double
actual inline fun abs(x: Float): Float

Returns the absolute value of the given value x.

Since Kotlin 1.2
actual inline fun abs(n: Int): Int
actual inline fun abs(n: Long): Long

Returns the absolute value of the given value n.

Since Kotlin 1.2
actual external fun abs(x: Double): Double
actual external fun abs(x: Float): Float

Returns the absolute value of the given value x.

Since Kotlin 1.3
actual external fun abs(n: Int): Int
actual external fun abs(n: Long): Long

Returns the absolute value of the given value n.

Since Kotlin 1.3
Link copied to clipboard
expect fun acos(x: Double): Double
expect fun acos(x: Float): Float

Computes the arc cosine of the value x; the returned value is an angle in the range from 0.0 to PI radians.

Since Kotlin 1.2
actual inline fun acos(x: Double): Double
actual inline fun acos(x: Float): Float

Computes the arc cosine of the value x; the returned value is an angle in the range from 0.0 to PI radians.

Since Kotlin 1.2
actual inline fun acos(x: Double): Double
actual inline fun acos(x: Float): Float

Computes the arc cosine of the value x; the returned value is an angle in the range from 0.0 to PI radians.

Since Kotlin 1.2
actual external fun acos(x: Double): Double
actual external fun acos(x: Float): Float

Computes the arc cosine of the value x; the returned value is an angle in the range from 0.0 to PI radians.

Since Kotlin 1.3
Link copied to clipboard
expect fun acosh(x: Double): Double
expect fun acosh(x: Float): Float

Computes the inverse hyperbolic cosine of the value x.

Since Kotlin 1.2
actual inline fun acosh(x: Double): Double
actual inline fun acosh(x: Float): Float

Computes the inverse hyperbolic cosine of the value x.

Since Kotlin 1.2
actual fun acosh(x: Double): Double
actual inline fun acosh(x: Float): Float

Computes the inverse hyperbolic cosine of the value x.

Since Kotlin 1.2
actual external fun acosh(x: Double): Double
actual external fun acosh(x: Float): Float

Computes the inverse hyperbolic cosine of the value x.

Since Kotlin 1.3
Link copied to clipboard
expect fun asin(x: Double): Double
expect fun asin(x: Float): Float

Computes the arc sine of the value x; the returned value is an angle in the range from -PI/2 to PI/2 radians.

Since Kotlin 1.2
actual inline fun asin(x: Double): Double
actual inline fun asin(x: Float): Float

Computes the arc sine of the value x; the returned value is an angle in the range from -PI/2 to PI/2 radians.

Since Kotlin 1.2
actual inline fun asin(x: Double): Double
actual inline fun asin(x: Float): Float

Computes the arc sine of the value x; the returned value is an angle in the range from -PI/2 to PI/2 radians.

Since Kotlin 1.2
actual external fun asin(x: Double): Double
actual external fun asin(x: Float): Float

Computes the arc sine of the value x; the returned value is an angle in the range from -PI/2 to PI/2 radians.

Since Kotlin 1.3
Link copied to clipboard
expect fun asinh(x: Double): Double
expect fun asinh(x: Float): Float

Computes the inverse hyperbolic sine of the value x.

Since Kotlin 1.2
actual inline fun asinh(x: Double): Double
actual inline fun asinh(x: Float): Float

Computes the inverse hyperbolic sine of the value x.

Since Kotlin 1.2
actual fun asinh(x: Double): Double
actual inline fun asinh(x: Float): Float

Computes the inverse hyperbolic sine of the value x.

Since Kotlin 1.2
actual external fun asinh(x: Double): Double
actual external fun asinh(x: Float): Float

Computes the inverse hyperbolic sine of the value x.

Since Kotlin 1.3
Link copied to clipboard
expect fun atan(x: Double): Double
expect fun atan(x: Float): Float

Computes the arc tangent of the value x; the returned value is an angle in the range from -PI/2 to PI/2 radians.

Since Kotlin 1.2
actual inline fun atan(x: Double): Double
actual inline fun atan(x: Float): Float

Computes the arc tangent of the value x; the returned value is an angle in the range from -PI/2 to PI/2 radians.

Since Kotlin 1.2
actual inline fun atan(x: Double): Double
actual inline fun atan(x: Float): Float

Computes the arc tangent of the value x; the returned value is an angle in the range from -PI/2 to PI/2 radians.

Since Kotlin 1.2
actual external fun atan(x: Double): Double
actual external fun atan(x: Float): Float

Computes the arc tangent of the value x; the returned value is an angle in the range from -PI/2 to PI/2 radians.

Since Kotlin 1.3
Link copied to clipboard
expect fun atan2(y: Double, x: Double): Double
expect fun atan2(y: Float, x: Float): Float

Returns the angle theta of the polar coordinates (r, theta) that correspond to the rectangular coordinates (x, y) by computing the arc tangent of the value y / x; the returned value is an angle in the range from -PI to PI radians.

Since Kotlin 1.2
actual inline fun atan2(y: Double, x: Double): Double
actual inline fun atan2(y: Float, x: Float): Float

Returns the angle theta of the polar coordinates (r, theta) that correspond to the rectangular coordinates (x, y) by computing the arc tangent of the value y / x; the returned value is an angle in the range from -PI to PI radians.

Since Kotlin 1.2
actual inline fun atan2(y: Double, x: Double): Double
actual inline fun atan2(y: Float, x: Float): Float

Returns the angle theta of the polar coordinates (r, theta) that correspond to the rectangular coordinates (x, y) by computing the arc tangent of the value y / x; the returned value is an angle in the range from -PI to PI radians.

Since Kotlin 1.2
actual external fun atan2(y: Double, x: Double): Double
actual external fun atan2(y: Float, x: Float): Float

Returns the angle theta of the polar coordinates (r, theta) that correspond to the rectangular coordinates (x, y) by computing the arc tangent of the value y / x; the returned value is an angle in the range from -PI to PI radians.

Since Kotlin 1.3
Link copied to clipboard
expect fun atanh(x: Double): Double
expect fun atanh(x: Float): Float

Computes the inverse hyperbolic tangent of the value x.

Since Kotlin 1.2
actual inline fun atanh(x: Double): Double
actual inline fun atanh(x: Float): Float

Computes the inverse hyperbolic tangent of the value x.

Since Kotlin 1.2
actual fun atanh(x: Double): Double
actual inline fun atanh(x: Float): Float

Computes the inverse hyperbolic tangent of the value x.

Since Kotlin 1.2
actual external fun atanh(x: Double): Double
actual external fun atanh(x: Float): Float

Computes the inverse hyperbolic tangent of the value x.

Since Kotlin 1.3
Link copied to clipboard

Returns the cube root of x. For any x, cbrt(-x) == -cbrt(x); that is, the cube root of a negative value is the negative of the cube root of that value's magnitude. Special cases:

Since Kotlin 1.7
actual inline fun cbrt(x: Double): Double
actual inline fun cbrt(x: Float): Float

Returns the cube root of x. For any x, cbrt(-x) == -cbrt(x); that is, the cube root of a negative value is the negative of the cube root of that value's magnitude. Special cases:

Since Kotlin 1.7
actual inline fun cbrt(x: Double): Double
actual inline fun cbrt(x: Float): Float

Returns the cube root of x. For any x, cbrt(-x) == -cbrt(x); that is, the cube root of a negative value is the negative of the cube root of that value's magnitude. Special cases:

Since Kotlin 1.7
actual external fun cbrt(x: Double): Double
actual external fun cbrt(x: Float): Float

Returns the cube root of x. For any x, cbrt(-x) == -cbrt(x); that is, the cube root of a negative value is the negative of the cube root of that value's magnitude. Special cases:

Since Kotlin 1.7
Link copied to clipboard
expect fun ceil(x: Double): Double
expect fun ceil(x: Float): Float

Rounds the given value x to an integer towards positive infinity.

Since Kotlin 1.2
actual inline fun ceil(x: Double): Double
actual inline fun ceil(x: Float): Float

Rounds the given value x to an integer towards positive infinity.

Since Kotlin 1.2
actual inline fun ceil(x: Double): Double
actual inline fun ceil(x: Float): Float

Rounds the given value x to an integer towards positive infinity.

Since Kotlin 1.2
actual external fun ceil(x: Double): Double
actual external fun ceil(x: Float): Float

Rounds the given value x to an integer towards positive infinity.

Since Kotlin 1.3
Link copied to clipboard
expect fun cos(x: Double): Double
expect fun cos(x: Float): Float

Computes the cosine of the angle x given in radians.

Since Kotlin 1.2
actual inline fun cos(x: Double): Double
actual inline fun cos(x: Float): Float

Computes the cosine of the angle x given in radians.

Since Kotlin 1.2
actual inline fun cos(x: Double): Double
actual inline fun cos(x: Float): Float

Computes the cosine of the angle x given in radians.

Since Kotlin 1.2
actual external fun cos(x: Double): Double
actual external fun cos(x: Float): Float

Computes the cosine of the angle x given in radians.

Since Kotlin 1.3
Link copied to clipboard
expect fun cosh(x: Double): Double
expect fun cosh(x: Float): Float

Computes the hyperbolic cosine of the value x.

Since Kotlin 1.2
actual inline fun cosh(x: Double): Double
actual inline fun cosh(x: Float): Float

Computes the hyperbolic cosine of the value x.

Since Kotlin 1.2
actual inline fun cosh(x: Double): Double
actual inline fun cosh(x: Float): Float

Computes the hyperbolic cosine of the value x.

Since Kotlin 1.2
actual external fun cosh(x: Double): Double
actual external fun cosh(x: Float): Float

Computes the hyperbolic cosine of the value x.

Since Kotlin 1.3
Link copied to clipboard
expect fun exp(x: Double): Double
expect fun exp(x: Float): Float

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

Since Kotlin 1.2
actual inline fun exp(x: Double): Double
actual inline fun exp(x: Float): Float

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

Since Kotlin 1.2
actual inline fun exp(x: Double): Double
actual inline fun exp(x: Float): Float

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

Since Kotlin 1.2
actual external fun exp(x: Double): Double
actual external fun exp(x: Float): Float

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

Since Kotlin 1.3
Link copied to clipboard
expect fun expm1(x: Double): Double
expect fun expm1(x: Float): Float

Computes exp(x) - 1.

Since Kotlin 1.2
actual inline fun expm1(x: Double): Double
actual inline fun expm1(x: Float): Float

Computes exp(x) - 1.

Since Kotlin 1.2
actual inline fun expm1(x: Double): Double
actual inline fun expm1(x: Float): Float

Computes exp(x) - 1.

Since Kotlin 1.2
actual external fun expm1(x: Double): Double
actual external fun expm1(x: Float): Float

Computes exp(x) - 1.

Since Kotlin 1.3
Link copied to clipboard
expect fun floor(x: Double): Double
expect fun floor(x: Float): Float

Rounds the given value x to an integer towards negative infinity.

Since Kotlin 1.2
actual inline fun floor(x: Double): Double
actual inline fun floor(x: Float): Float

Rounds the given value x to an integer towards negative infinity.

Since Kotlin 1.2
actual inline fun floor(x: Double): Double
actual inline fun floor(x: Float): Float

Rounds the given value x to an integer towards negative infinity.

Since Kotlin 1.2
actual external fun floor(x: Double): Double
actual external fun floor(x: Float): Float

Rounds the given value x to an integer towards negative infinity.

Since Kotlin 1.3
Link copied to clipboard
expect fun hypot(x: Double, y: Double): Double
expect fun hypot(x: Float, y: Float): Float

Computes sqrt(x^2 + y^2) without intermediate overflow or underflow.

Since Kotlin 1.2
actual inline fun hypot(x: Double, y: Double): Double
actual inline fun hypot(x: Float, y: Float): Float

Computes sqrt(x^2 + y^2) without intermediate overflow or underflow.

Since Kotlin 1.2
actual inline fun hypot(x: Double, y: Double): Double
actual inline fun hypot(x: Float, y: Float): Float

Computes sqrt(x^2 + y^2) without intermediate overflow or underflow.

Since Kotlin 1.2
actual external fun hypot(x: Double, y: Double): Double
actual external fun hypot(x: Float, y: Float): Float

Computes sqrt(x^2 + y^2) without intermediate overflow or underflow.

Since Kotlin 1.3
Link copied to clipboard
inline fun Double.IEEErem(divisor: Double): Double
inline fun Float.IEEErem(divisor: Float): Float

Computes the remainder of division of this value by the divisor value according to the IEEE 754 standard.

Since Kotlin 1.2
external fun Double.IEEErem(divisor: Double): Double
external fun Float.IEEErem(divisor: Float): Float

Computes the remainder of division of this value by the divisor value according to the IEEE 754 standard.

Since Kotlin 1.3
Link copied to clipboard
expect fun ln(x: Double): Double
expect fun ln(x: Float): Float

Computes the natural logarithm (base E) of the value x.

Since Kotlin 1.2
actual inline fun ln(x: Double): Double
actual inline fun ln(x: Float): Float

Computes the natural logarithm (base E) of the value x.

Since Kotlin 1.2
actual inline fun ln(x: Double): Double
actual inline fun ln(x: Float): Float

Computes the natural logarithm (base E) of the value x.

Since Kotlin 1.2
actual external fun ln(x: Double): Double
actual external fun ln(x: Float): Float

Computes the natural logarithm (base E) of the value x.

Since Kotlin 1.3
Link copied to clipboard
expect fun ln1p(x: Double): Double

Computes ln(x + 1).

Since Kotlin 1.2
expect fun ln1p(x: Float): Float

Computes ln(a + 1).

Since Kotlin 1.2
actual inline fun ln1p(x: Double): Double

Computes ln(x + 1).

Since Kotlin 1.2
actual inline fun ln1p(x: Float): Float

Computes ln(a + 1).

Since Kotlin 1.2
actual inline fun ln1p(x: Double): Double

Computes ln(x + 1).

Since Kotlin 1.2
actual inline fun ln1p(x: Float): Float

Computes ln(a + 1).

Since Kotlin 1.2
actual external fun ln1p(x: Double): Double

Computes ln(x + 1).

Since Kotlin 1.3
actual external fun ln1p(x: Float): Float

Computes ln(a + 1).

Since Kotlin 1.3
Link copied to clipboard
expect fun log(x: Double, base: Double): Double
expect fun log(x: Float, base: Float): Float

Computes the logarithm of the value x to the given base.

Since Kotlin 1.2
actual fun log(x: Double, base: Double): Double
actual inline fun log(x: Float, base: Float): Float

Computes the logarithm of the value x to the given base.

Since Kotlin 1.2
actual fun log(x: Double, base: Double): Double
actual fun log(x: Float, base: Float): Float

Computes the logarithm of the value x to the given base.

Since Kotlin 1.2
actual fun log(x: Double, base: Double): Double
actual fun log(x: Float, base: Float): Float

Computes the logarithm of the value x to the given base.

Since Kotlin 1.3
Link copied to clipboard
expect fun log10(x: Double): Double
expect fun log10(x: Float): Float

Computes the common logarithm (base 10) of the value x.

Since Kotlin 1.2
actual inline fun log10(x: Double): Double
actual inline fun log10(x: Float): Float

Computes the common logarithm (base 10) of the value x.

Since Kotlin 1.2
actual inline fun log10(x: Double): Double
actual inline fun log10(x: Float): Float

Computes the common logarithm (base 10) of the value x.

Since Kotlin 1.2
actual external fun log10(x: Double): Double
actual external fun log10(x: Float): Float

Computes the common logarithm (base 10) of the value x.

Since Kotlin 1.3
Link copied to clipboard
expect fun log2(x: Double): Double
expect fun log2(x: Float): Float

Computes the binary logarithm (base 2) of the value x.

Since Kotlin 1.2
actual inline fun log2(x: Double): Double
actual inline fun log2(x: Float): Float

Computes the binary logarithm (base 2) of the value x.

Since Kotlin 1.2
actual fun log2(x: Double): Double
actual fun log2(x: Float): Float

Computes the binary logarithm (base 2) of the value x.

Since Kotlin 1.2
actual external fun log2(x: Double): Double
actual external fun log2(x: Float): Float

Computes the binary logarithm (base 2) of the value x.

Since Kotlin 1.3
Link copied to clipboard
expect fun max(a: Double, b: Double): Double
expect fun max(a: Float, b: Float): Float
expect fun max(a: Int, b: Int): Int
expect fun max(a: Long, b: Long): Long

Returns the greater of two values.

Since Kotlin 1.2
inline fun max(a: UInt, b: UInt): UInt
inline fun max(a: ULong, b: ULong): ULong

Returns the greater of two values.

Since Kotlin 1.5
actual inline fun max(a: Double, b: Double): Double
actual inline fun max(a: Float, b: Float): Float
actual inline fun max(a: Int, b: Int): Int
actual inline fun max(a: Long, b: Long): Long

Returns the greater of two values.

Since Kotlin 1.2
actual inline fun max(a: Double, b: Double): Double
actual inline fun max(a: Float, b: Float): Float
actual inline fun max(a: Int, b: Int): Int
actual inline fun max(a: Long, b: Long): Long

Returns the greater of two values.

Since Kotlin 1.2
actual fun max(a: Double, b: Double): Double
actual fun max(a: Float, b: Float): Float
actual fun max(a: Int, b: Int): Int
actual fun max(a: Long, b: Long): Long

Returns the greater of two values.

Since Kotlin 1.3
Link copied to clipboard
expect fun min(a: Double, b: Double): Double
expect fun min(a: Float, b: Float): Float
expect fun min(a: Int, b: Int): Int
expect fun min(a: Long, b: Long): Long

Returns the smaller of two values.

Since Kotlin 1.2
inline fun min(a: UInt, b: UInt): UInt
inline fun min(a: ULong, b: ULong): ULong

Returns the smaller of two values.

Since Kotlin 1.5
actual inline fun min(a: Double, b: Double): Double
actual inline fun min(a: Float, b: Float): Float
actual inline fun min(a: Int, b: Int): Int
actual inline fun min(a: Long, b: Long): Long

Returns the smaller of two values.

Since Kotlin 1.2
actual inline fun min(a: Double, b: Double): Double
actual inline fun min(a: Float, b: Float): Float
actual inline fun min(a: Int, b: Int): Int
actual inline fun min(a: Long, b: Long): Long

Returns the smaller of two values.

Since Kotlin 1.2
actual fun min(a: Double, b: Double): Double
actual fun min(a: Float, b: Float): Float
actual fun min(a: Int, b: Int): Int
actual fun min(a: Long, b: Long): Long

Returns the smaller of two values.

Since Kotlin 1.3
Link copied to clipboard
expect fun Double.nextDown(): Double

Returns the Double value nearest to this value in direction of negative infinity.

Since Kotlin 1.2
actual fun Double.nextDown(): Double

Returns the Double value nearest to this value in direction of negative infinity.

Since Kotlin 1.2
actual inline fun Double.nextDown(): Double

Returns the Double value nearest to this value in direction of negative infinity.

Since Kotlin 1.2
inline fun Float.nextDown(): Float

Returns the Float value nearest to this value in direction of negative infinity.

Since Kotlin 1.2
actual external fun Double.nextDown(): Double

Returns the Double value nearest to this value in direction of negative infinity.

Since Kotlin 1.3
external fun Float.nextDown(): Float

Returns the Float value nearest to this value in direction of negative infinity.

Since Kotlin 1.3
Link copied to clipboard
expect fun Double.nextTowards(to: Double): Double

Returns the Double value nearest to this value in direction from this value towards the value to.

Since Kotlin 1.2
actual fun Double.nextTowards(to: Double): Double

Returns the Double value nearest to this value in direction from this value towards the value to.

Since Kotlin 1.2
actual inline fun Double.nextTowards(to: Double): Double

Returns the Double value nearest to this value in direction from this value towards the value to.

Since Kotlin 1.2
inline fun Float.nextTowards(to: Float): Float

Returns the Float value nearest to this value in direction from this value towards the value to.

Since Kotlin 1.2
actual external fun Double.nextTowards(to: Double): Double

Returns the Double value nearest to this value in direction from this value towards the value to.

Since Kotlin 1.3
external fun Float.nextTowards(to: Float): Float

Returns the Float value nearest to this value in direction from this value towards the value to.

Since Kotlin 1.3
Link copied to clipboard
expect fun Double.nextUp(): Double

Returns the Double value nearest to this value in direction of positive infinity.

Since Kotlin 1.2
actual fun Double.nextUp(): Double

Returns the Double value nearest to this value in direction of positive infinity.

Since Kotlin 1.2
actual inline fun Double.nextUp(): Double

Returns the Double value nearest to this value in direction of positive infinity.

Since Kotlin 1.2
inline fun Float.nextUp(): Float

Returns the Float value nearest to this value in direction of positive infinity.

Since Kotlin 1.2
actual external fun Double.nextUp(): Double

Returns the Double value nearest to this value in direction of positive infinity.

Since Kotlin 1.3
external fun Float.nextUp(): Float

Returns the Float value nearest to this value in direction of positive infinity.

Since Kotlin 1.3
Link copied to clipboard
expect fun Double.pow(x: Double): Double
expect fun Float.pow(x: Float): Float

Raises this value to the power x.

Since Kotlin 1.2
expect fun Double.pow(n: Int): Double
expect fun Float.pow(n: Int): Float

Raises this value to the integer power n.

Since Kotlin 1.2
actual inline fun Double.pow(x: Double): Double
actual inline fun Float.pow(x: Float): Float

Raises this value to the power x.

Since Kotlin 1.2
actual inline fun Double.pow(n: Int): Double
actual inline fun Float.pow(n: Int): Float

Raises this value to the integer power n.

Since Kotlin 1.2
actual inline fun Double.pow(x: Double): Double
actual inline fun Float.pow(x: Float): Float

Raises this value to the power x.

Since Kotlin 1.2
actual inline fun Double.pow(n: Int): Double
actual inline fun Float.pow(n: Int): Float

Raises this value to the integer power n.

Since Kotlin 1.2
actual external fun Double.pow(x: Double): Double
actual external fun Float.pow(x: Float): Float

Raises this value to the power x.

Since Kotlin 1.3
actual fun Double.pow(n: Int): Double
actual fun Float.pow(n: Int): Float

Raises this value to the integer power n.

Since Kotlin 1.3
Link copied to clipboard
expect fun round(x: Double): Double
expect fun round(x: Float): Float

Rounds the given value x towards the closest integer with ties rounded towards even integer.

Since Kotlin 1.2
actual fun round(x: Double): Double
actual inline fun round(x: Float): Float

Rounds the given value x towards the closest integer with ties rounded towards even integer.

Since Kotlin 1.2
actual inline fun round(x: Double): Double
actual inline fun round(x: Float): Float

Rounds the given value x towards the closest integer with ties rounded towards even integer.

Since Kotlin 1.2
actual external fun round(x: Double): Double
actual external fun round(x: Float): Float

Rounds the given value x towards the closest integer with ties rounded towards even integer.

Since Kotlin 1.3
Link copied to clipboard
expect fun Double.roundToInt(): Int

Rounds this Double value to the nearest integer and converts the result to Int. Ties are rounded towards positive infinity.

Since Kotlin 1.2
expect fun Float.roundToInt(): Int

Rounds this Float value to the nearest integer and converts the result to Int. Ties are rounded towards positive infinity.

Since Kotlin 1.2
actual fun Double.roundToInt(): Int

Rounds this Double value to the nearest integer and converts the result to Int. Ties are rounded towards positive infinity.

Since Kotlin 1.2
actual inline fun Float.roundToInt(): Int

Rounds this Float value to the nearest integer and converts the result to Int. Ties are rounded towards positive infinity.

Since Kotlin 1.2
actual fun Double.roundToInt(): Int

Rounds this Double value to the nearest integer and converts the result to Int. Ties are rounded towards positive infinity.

Since Kotlin 1.2
actual fun Float.roundToInt(): Int

Rounds this Float value to the nearest integer and converts the result to Int. Ties are rounded towards positive infinity.

Since Kotlin 1.2
actual fun Double.roundToInt(): Int

Rounds this Double value to the nearest integer and converts the result to Int. Ties are rounded towards positive infinity.

Since Kotlin 1.3
actual fun Float.roundToInt(): Int

Rounds this Float value to the nearest integer and converts the result to Int. Ties are rounded towards positive infinity.

Since Kotlin 1.3
Link copied to clipboard
expect fun Double.roundToLong(): Long

Rounds this Double value to the nearest integer and converts the result to Long. Ties are rounded towards positive infinity.

Since Kotlin 1.2
expect fun Float.roundToLong(): Long

Rounds this Float value to the nearest integer and converts the result to Long. Ties are rounded towards positive infinity.

Since Kotlin 1.2
actual fun Double.roundToLong(): Long

Rounds this Double value to the nearest integer and converts the result to Long. Ties are rounded towards positive infinity.

Since Kotlin 1.2
actual inline fun Float.roundToLong(): Long

Rounds this Float value to the nearest integer and converts the result to Long. Ties are rounded towards positive infinity.

Since Kotlin 1.2
actual fun Double.roundToLong(): Long

Rounds this Double value to the nearest integer and converts the result to Long. Ties are rounded towards positive infinity.

Since Kotlin 1.2
actual fun Float.roundToLong(): Long

Rounds this Float value to the nearest integer and converts the result to Long. Ties are rounded towards positive infinity.

Since Kotlin 1.2
actual fun Double.roundToLong(): Long

Rounds this Double value to the nearest integer and converts the result to Long. Ties are rounded towards positive infinity.

Since Kotlin 1.3
actual fun Float.roundToLong(): Long

Rounds this Float value to the nearest integer and converts the result to Long. Ties are rounded towards positive infinity.

Since Kotlin 1.3
Link copied to clipboard
expect fun sign(x: Double): Double
expect fun sign(x: Float): Float

Returns the sign of the given value x:

Since Kotlin 1.2
actual inline fun sign(x: Double): Double
actual inline fun sign(x: Float): Float

Returns the sign of the given value x:

Since Kotlin 1.2
actual inline fun sign(x: Double): Double
actual inline fun sign(x: Float): Float

Returns the sign of the given value x:

Since Kotlin 1.2
actual fun sign(x: Double): Double
actual fun sign(x: Float): Float

Returns the sign of the given value x:

Since Kotlin 1.3
Link copied to clipboard
expect fun sin(x: Double): Double
expect fun sin(x: Float): Float

Computes the sine of the angle x given in radians.

Since Kotlin 1.2
actual inline fun sin(x: Double): Double
actual inline fun sin(x: Float): Float

Computes the sine of the angle x given in radians.

Since Kotlin 1.2
actual inline fun sin(x: Double): Double
actual inline fun sin(x: Float): Float

Computes the sine of the angle x given in radians.

Since Kotlin 1.2
actual external fun sin(x: Double): Double
actual external fun sin(x: Float): Float

Computes the sine of the angle x given in radians.

Since Kotlin 1.3
Link copied to clipboard
expect fun sinh(x: Double): Double
expect fun sinh(x: Float): Float

Computes the hyperbolic sine of the value x.

Since Kotlin 1.2
actual inline fun sinh(x: Double): Double
actual inline fun sinh(x: Float): Float

Computes the hyperbolic sine of the value x.

Since Kotlin 1.2
actual inline fun sinh(x: Double): Double
actual inline fun sinh(x: Float): Float

Computes the hyperbolic sine of the value x.

Since Kotlin 1.2
actual external fun sinh(x: Double): Double
actual external fun sinh(x: Float): Float

Computes the hyperbolic sine of the value x.

Since Kotlin 1.3
Link copied to clipboard
expect fun sqrt(x: Double): Double
expect fun sqrt(x: Float): Float

Computes the positive square root of the value x.

Since Kotlin 1.2
actual inline fun sqrt(x: Double): Double
actual inline fun sqrt(x: Float): Float

Computes the positive square root of the value x.

Since Kotlin 1.2
actual inline fun sqrt(x: Double): Double
actual inline fun sqrt(x: Float): Float

Computes the positive square root of the value x.

Since Kotlin 1.2
actual external fun sqrt(x: Double): Double
actual external fun sqrt(x: Float): Float

Computes the positive square root of the value x.

Since Kotlin 1.3
Link copied to clipboard
expect fun tan(x: Double): Double
expect fun tan(x: Float): Float

Computes the tangent of the angle x given in radians.

Since Kotlin 1.2
actual inline fun tan(x: Double): Double
actual inline fun tan(x: Float): Float

Computes the tangent of the angle x given in radians.

Since Kotlin 1.2
actual inline fun tan(x: Double): Double
actual inline fun tan(x: Float): Float

Computes the tangent of the angle x given in radians.

Since Kotlin 1.2
actual external fun tan(x: Double): Double
actual external fun tan(x: Float): Float

Computes the tangent of the angle x given in radians.

Since Kotlin 1.3
Link copied to clipboard
expect fun tanh(x: Double): Double
expect fun tanh(x: Float): Float

Computes the hyperbolic tangent of the value x.

Since Kotlin 1.2
actual inline fun tanh(x: Double): Double
actual inline fun tanh(x: Float): Float

Computes the hyperbolic tangent of the value x.

Since Kotlin 1.2
actual inline fun tanh(x: Double): Double
actual inline fun tanh(x: Float): Float

Computes the hyperbolic tangent of the value x.

Since Kotlin 1.2
actual external fun tanh(x: Double): Double
actual external fun tanh(x: Float): Float

Computes the hyperbolic tangent of the value x.

Since Kotlin 1.3
Link copied to clipboard
expect fun truncate(x: Double): Double
expect fun truncate(x: Float): Float

Rounds the given value x to an integer towards zero.

Since Kotlin 1.2
actual inline fun truncate(x: Double): Double
actual inline fun truncate(x: Float): Float

Rounds the given value x to an integer towards zero.

Since Kotlin 1.2
actual fun truncate(x: Double): Double
actual fun truncate(x: Float): Float

Rounds the given value x to an integer towards zero.

Since Kotlin 1.2
actual fun truncate(x: Double): Double
actual fun truncate(x: Float): Float

Rounds the given value x to an integer towards zero.

Since Kotlin 1.3
Link copied to clipboard
expect fun Double.withSign(sign: Double): Double
expect fun Double.withSign(sign: Int): Double
expect fun Float.withSign(sign: Float): Float
expect fun Float.withSign(sign: Int): Float

Returns this value with the sign bit same as of the sign value.

Since Kotlin 1.2
actual fun Double.withSign(sign: Double): Double
actual inline fun Double.withSign(sign: Int): Double
actual inline fun Float.withSign(sign: Float): Float
actual inline fun Float.withSign(sign: Int): Float

Returns this value with the sign bit same as of the sign value.

Since Kotlin 1.2
actual inline fun Double.withSign(sign: Double): Double
actual inline fun Double.withSign(sign: Int): Double
actual inline fun Float.withSign(sign: Float): Float
actual inline fun Float.withSign(sign: Int): Float

Returns this value with the sign bit same as of the sign value.

Since Kotlin 1.2
actual external fun Double.withSign(sign: Double): Double
actual fun Double.withSign(sign: Int): Double
actual external fun Float.withSign(sign: Float): Float
actual fun Float.withSign(sign: Int): Float

Returns this value with the sign bit same as of the sign value.

Since Kotlin 1.3