Português
Abrir no Telegram

Tópicoя же сделал по другому немного но на Си:

2 mensagens · –
С
я же сделал по другому немного но на Си: float real48_to_float(unsigned char* real48_data) { unsigned char bytes[6]; float result; int i; /* Copy the 6 bytes of the real48 data into a local array */ for (i = 0; i < 6; i++) { bytes[i] = real48_data[i]; } /* Convert the real48 data to a float */ bytes[5] &= 0x7F; result = (float)((bytes[0] << 8) | bytes[1]); result += (float)((bytes[2] << 8) | bytes[3]) / 65536.0; result += (float)((bytes[4] << 8) | bytes[5]) / 4294967296.0; if (real48_data[5] & 0x80) { result = -result; } return result; }
  1. T
    Очень странно в float это совать. Он же 4 байтовый...
ССообщество Python ПрограммистовСообщество Python Программистов@python_scripts · grupo · Tecnologia
4 169membros43escrevendo em 30 dias
Feed da comunidade Abrir no Telegram

Um feed público aberto do índice de busca ChatCrawler — “o Google do Telegram público”; atualizado à medida que a comunidade é rastreada. Horários em UTC.

Somente conteúdo público, API oficial do Telegram. Sobre · Perguntas frequentes · Limites do índice · Remover uma página · Catálogo · Busca · Como calculamos