Deutsch
Telegram

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

2 Nachrichten · –
С
я же сделал по другому немного но на Си: 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 · Gruppe · Technik
4 169Mitglieder43schreiben in 30 Tagen
Community-Feed In Telegram öffnen

Ein offener öffentlicher Feed aus dem Suchindex ChatCrawler — „Google für das öffentliche Telegram“; wird aktualisiert, während die Community gecrawlt wird. Zeiten in UTC.

Nur öffentliche Inhalte, offizielle Telegram-API. Über uns · FAQ · Grenzen des Index · Seite entfernen · Katalog · Suche · So zählen wir