logBase package:grisette

Safe logBase with default values returned on exception.
>>> logBaseOr "d" "base" "val" :: SymAlgReal
(ite (= base 1.0) d (fdiv (log val) (log base)))
Safe logBase with 0 returned on exception.
Safe logBase with default values returned on exception.
Safe logBase with monadic error handling in multi-path execution. These procedures throw an exception when the base is 1. The result should be able to handle errors with MonadError.
Safe logBase with monadic error handling in multi-path execution.
>>> safeLogBase (ssym "base") (ssym "val") :: ExceptT ArithException Union SymAlgReal
ExceptT {If (= base 1.0) (Left Ratio has zero denominator) (Right (fdiv (log val) (log base)))}