import math


def _inner_log_logistic_sigmoid(x):
    """Log of the logistic sigmoid function log(1 / (1 + e ** -x))"""
    if x > 0:
        return -math.log(1. + math.exp(-x))
    else:
        return x - math.log(1. + math.exp(x))