base 2 log => natural log (on the advice of Nuno)

Value: [1e-4 to 2e-1]
This commit is contained in:
Quinn Dougherty 2022-05-02 17:46:43 -04:00
parent a4c3405e5d
commit ca95c7cef8

View File

@ -1,8 +1,8 @@
module LogScoring = {
let logFn = Js.Math.log2
let logFn = Js.Math.log
let subtraction = (a, b) => Ok(a -. b)
let logScore = (a: float, b: float): result<float, Operation.Error.t> => Ok(
Js.Math.log2(Js.Math.abs_float(a /. b)),
logFn(Js.Math.abs_float(a /. b)),
)
let multiply = (a: float, b: float): result<float, Operation.Error.t> => Ok(a *. b)
}