How do you find the base y logarithm of the number x in Scala? I searched the scala.math library and I cannot find a way. It seems to have only log10 (x) and ln (x).
This is a math question :)
log<base y>(x) == log10(x)/log10(y) == ln(x)/ln(y)
A random internet link that explains this:
http://www.purplemath.com/modules/logrules5.htm
For convenience, you can use the lambda function, for example,
scala> var log2 = (x: Double) => log10(x)/log10(2.0) log2: Double => Double = <function1> scala> log2(2) res0: Double = 1.0
Source: https://habr.com/ru/post/984972/More articles:Easy Swift Voice Recognition? - iosIs it possible to edit swipe to delete (in a UITableView) the default text or translate it? - iosDjango cannot display context when in shell - python4th argument of the link function - angularjsDownload the image from the URL and draw on the HTML5 canvas. - javascriptdispatchTouchEvent in Snippet on Android - androidLogging into django admin suddenly requires a csrf token - djangoYii2 - add an additional button to the Action field - buttonFriend Functions and Static Data Elements - c ++Getting a NullPointerException when parsing JSON - javaAll Articles