MathPHP\Statistics\Average::logarithmicMean PHP Method

logarithmicMean() public static method

https://en.wikipedia.org/wiki/Logarithmic_mean Mlm(x, y) = 0 if x = 0 or y = 0 x if x = y otherwise: y - x ----------- ln y - ln x
public static logarithmicMean ( number $x, number $y ) : number
$x number
$y number
return number
    public static function logarithmicMean($x, $y)
    {
        if ($x == 0 || $y == 0) {
            return 0;
        }
        if ($x == $y) {
            return $x;
        }
        return ($y - $x) / (log($y) - log($x));
    }