Atlas
0.7.0
Networking protocol for the Worldforge system.
|
def encode_float(self, value): mant, exp = frexp(value) mant = long(mant *2L**20) exp = exp - 20 if mant>=0: if exp>=0: type_str = encode_pos_int(float_pos_pos_type) else: type_str = encode_pos_int(float_pos_neg_type) exp = -exp else: mant = -mant if exp>=0: type_str = encode_pos_int(float_neg_pos_type) else: type_str = encode_pos_int(float_neg_neg_type) exp = -exp return type_str + \ encode_pos_int(mant) + \ encode_pos_int(exp) More...
Public Attributes | |
stack | |
msgList | |
mantissa | |
Static Public Attributes | |
def | init_length = init_int_pos |
dictionary | type2init |
dictionary | type2decoder |
def encode_float(self, value): mant, exp = frexp(value) mant = long(mant *2L**20) exp = exp - 20 if mant>=0: if exp>=0: type_str = encode_pos_int(float_pos_pos_type) else: type_str = encode_pos_int(float_pos_neg_type) exp = -exp else: mant = -mant if exp>=0: type_str = encode_pos_int(float_neg_pos_type) else: type_str = encode_pos_int(float_neg_neg_type) exp = -exp return type_str + \ encode_pos_int(mant) + \ encode_pos_int(exp)
Definition at line 74 of file binary2.py.
|
staticinherited |
Definition at line 300 of file binary1.py.
Referenced by atlas.codecs.binary1.Binary1Parser.__init__().
|
staticinherited |
Definition at line 287 of file binary1.py.
Referenced by atlas.codecs.binary1.Binary1Parser.__init__().