public function __invoke($x₀) { $function = $this->getFunction($x₀); if ($function === false) { throw new Exception\BadDataException("The input {$x₀} is not in the domain of this piecewise function, thus it is undefined at that point."); } return $function($x₀); }