summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorSeth Tisue <seth@tisue.net>2015-12-17 14:09:16 -0500
committerSeth Tisue <seth@tisue.net>2015-12-17 14:09:16 -0500
commitcd80eacd04ac6aa8ad49c8f86b3201b6bed40a96 (patch)
tree764f87431d4c1601ace9d1fa99e47af59b34d2b5 /src/library
parent39f22b9e59f3ec86fb2e0c0f5af7200dee178ea6 (diff)
parentb321cb672168cff491e4e69902b415df30620520 (diff)
downloadscala-cd80eacd04ac6aa8ad49c8f86b3201b6bed40a96.tar.gz
scala-cd80eacd04ac6aa8ad49c8f86b3201b6bed40a96.tar.bz2
scala-cd80eacd04ac6aa8ad49c8f86b3201b6bed40a96.zip
Merge pull request #4831 from martijnhoekstra/patch-4
add doc for log, sqrt
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/math/package.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/library/scala/math/package.scala b/src/library/scala/math/package.scala
index 58ece8a05b..a75979385c 100644
--- a/src/library/scala/math/package.scala
+++ b/src/library/scala/math/package.scala
@@ -58,7 +58,19 @@ package object math {
* logarithms.
*/
def exp(x: Double): Double = java.lang.Math.exp(x)
+
+ /** Returns the natural logarithm of a `double` value.
+ *
+ * @param x the number to take the natural logarithm of
+ * @return the value `logₑ(x)` where `e` is Eulers number
+ */
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)