Searched refs:exponent (Results 1 – 2 of 2) sorted by relevance
945 int exponent; in pb_encode_float_as_double() local952 exponent = (int)((in.i >> 23) & 0xFF) - 127; in pb_encode_float_as_double()955 if (exponent == 128) in pb_encode_float_as_double()958 exponent = 1024; in pb_encode_float_as_double()960 else if (exponent == -127) in pb_encode_float_as_double()965 exponent = -1023; in pb_encode_float_as_double()974 exponent--; in pb_encode_float_as_double()982 mantissa |= (uint64_t)(exponent + 1023) << 52; in pb_encode_float_as_double()
1647 int exponent; in pb_decode_double_as_float() local1657 exponent = (int)((value >> 52) & 0x7FF) - 1023; in pb_decode_double_as_float()1661 if (exponent == 1024) in pb_decode_double_as_float()1664 exponent = 128; in pb_decode_double_as_float()1669 if (exponent > 127) in pb_decode_double_as_float()1672 exponent = 128; in pb_decode_double_as_float()1675 else if (exponent < -150) in pb_decode_double_as_float()1678 exponent = -127; in pb_decode_double_as_float()1681 else if (exponent < -126) in pb_decode_double_as_float()1685 mantissa >>= (-126 - exponent); in pb_decode_double_as_float()[all …]