fixed build
Value: [1e-6 to 1e-4]
This commit is contained in:
parent
6c815a62ff
commit
cec4bbd334
|
@ -3,12 +3,12 @@ module LogScoring = {
|
|||
let subtraction = (a, b) => Ok(a -. b)
|
||||
let logScore = (a: float, b: float): result<float, Operation.Error.t> =>
|
||||
if a == 0.0 {
|
||||
Error(Operation.Error.NegativeInfinityError)
|
||||
Error(Operation.NegativeInfinityError)
|
||||
} else if b == 0.0 {
|
||||
Error(Operation.Error.DivideByZeroError)
|
||||
Error(Operation.DivisionByZeroError)
|
||||
} else {
|
||||
let quot = a /. b
|
||||
quot < 0.0 ? Error(OperationError.ComplexNumberError) : Ok(logFn(quot))
|
||||
quot < 0.0 ? Error(Operation.ComplexNumberError) : Ok(logFn(quot))
|
||||
}
|
||||
let multiply = (a: float, b: float): result<float, Operation.Error.t> => Ok(a *. b)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user