diff options
-rw-r--r-- | src/library/scala/math/package.scala | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/library/scala/math/package.scala b/src/library/scala/math/package.scala index 58ece8a05b..631648eba4 100644 --- a/src/library/scala/math/package.scala +++ b/src/library/scala/math/package.scala @@ -58,7 +58,21 @@ package object math { * logarithms. */ def exp(x: Double): Double = java.lang.Math.exp(x) + + /** Returns the natural logarithm of a `double` value. + * + * The natural logarithm is the logarithm base Euler's number `e`. + * + * @param x the number to take the natural logarithm of + * @return the value `ln(x)` where ln is the natural lograrithm + */ def log(x: Double): Double = java.lang.Math.log(x) + + /** Returns the square root of a `double` value. + * + * @param x the number to take the square root of + * @return the value √x + */ def sqrt(x: Double): Double = java.lang.Math.sqrt(x) def IEEEremainder(x: Double, y: Double): Double = java.lang.Math.IEEEremainder(x, y) |