Format of Float 64

Hi,

I’m writing a server in a different environment than Panda and I’m trying to figure out the format of the float 64 that is in PyDatagram. It doesn’t appear to be the IEEE format. Does anyone have any information on how the bits are being used?

I’m currently using strings to pass the floats back and forth, but I’d prefer to pass them as actual floats.

Example with the Adds in line with the values

Position Value Binary
Python add
pkg.addUint16(CMSG_DISCONNECT_REQ)
1 5
2 0
pkg.addFloat64(float(1))
3 0
4 0
5 0
6 0
7 0
8 0
9 240 11101111
10 63 00111111
pkg.addFloat64(float(2))
11 0
12 0
13 0
14 0
15 0
16 0
17 0
18 64 01000000
pkg.addFloat64(float(10))
19 0
20 0
21 0
22 0
23 0
24 0
25 36 00100100
26 64 01000000
pkg.addFloat64(float(100))
27 0
28 0
29 0
30 0
31 0
32 0
33 89 01011001
34 64 01000000
pkg.addFloat64(float(1000))
35 0
36 0
37 0
38 0
39 0
40 64 01000000
41 143 10001111
42 64 01000000
pkg.addFloat64(float(-1))
43 0
44 0
45 0
46 0
47 0
48 0
49 240
50 191
pkg.addFloat64(float(.1))
51 154
52 153
53 153
54 153
55 153
56 153
57 185
58 63

It is IEEE format, stored little-endian. Is there a particular problem you’re having?

David