Searched refs:exponent (Results 1 – 2 of 2) sorted by relevance
958 int exponent; in pb_encode_float_as_double() local965 exponent = (int)((in.i >> 23) & 0xFF) - 127; in pb_encode_float_as_double()968 if (exponent == 128) in pb_encode_float_as_double()971 exponent = 1024; in pb_encode_float_as_double()973 else if (exponent == -127) in pb_encode_float_as_double()978 exponent = -1023; in pb_encode_float_as_double()987 exponent--; in pb_encode_float_as_double()995 mantissa |= (uint64_t)(exponent + 1023) << 52; in pb_encode_float_as_double()
1665 int exponent; in pb_decode_double_as_float() local1675 exponent = (int)((value >> 52) & 0x7FF) - 1023; in pb_decode_double_as_float()1679 if (exponent == 1024) in pb_decode_double_as_float()1682 exponent = 128; in pb_decode_double_as_float()1687 if (exponent > 127) in pb_decode_double_as_float()1690 exponent = 128; in pb_decode_double_as_float()1693 else if (exponent < -150) in pb_decode_double_as_float()1696 exponent = -127; in pb_decode_double_as_float()1699 else if (exponent < -126) in pb_decode_double_as_float()1703 mantissa >>= (-126 - exponent); in pb_decode_double_as_float()[all …]