public function castFloat()
    {
        $castFunction = function ($value) {
            return (float) $value;
        };

        if (is_numeric($this->value)) {
            return $castFunction($this->value);
        }

        return $this->handleMismatch($castFunction, 'double');
    }