private function encodeNumber($float, array $options, callable $encode)
    {
        if ($this->isInteger($float, $options['float.integers'])) {
            return $this->encodeInteger($float, $encode);
        } elseif ($float === 0.0) {
            return '0.0';
        } elseif ($options['float.export']) {
            return var_export((float) $float, true);
        }

        return $this->encodeFloat($float, $this->determinePrecision($options));
    }