public static function identricMean($x, $y)
{
// x and y must be positive
if ($x <= 0 || $y <= 0) {
throw new Exception\OutOfBoundsException('x and y must be positive real numbers.');
}
// Special case: x if x = y
if ($x == $y) {
return $x;
}
// Standard case
$ℯ = \M_E;
$xˣ = $x ** $x;
$yʸ = $y ** $y;
return 1 / $ℯ * pow($xˣ / $yʸ, 1 / ($x - $y));
}