public static function packDouble($value)
    {
        $bin = pack('d', (float) $value);

        if (is_null(self::$little_endian)) {
            self::$little_endian = (pack('L', 1) == pack('V', 1));
        }

        if (self::$little_endian) {
            return $bin;
        }

        return self::swap($bin);
    }