fixed -inf bug with log/ln functions