On this page
pow
Platform and version requirements: JVM (1.2), JS (1.2), Native (1.2)
fun Double.pow(x: Double): Double
fun Float.pow(x: Float): Float
Raises this value to the power x.
Special cases:
b.pow(0.0)is1.0b.pow(1.0) == bb.pow(NaN)isNaNNaN.pow(x)isNaNforx != 0.0b.pow(Inf)isNaNforabs(b) == 1.0b.pow(x)isNaNforb < 0andxis finite and not an integer
Platform and version requirements: JVM (1.2), JS (1.2), Native (1.2)
fun Double.pow(n: Int): Double
fun Float.pow(n: Int): Float
© 2010–2022 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.math/pow.html