def _reg2float(reg):
    """Converts 32-bit register value to floats in Python.

    Parameters
    ----------
    reg: int
        A 32-bit register value read from the mailbox.

    Returns
    -------
    float
        A float number translated from the register value.

    """
    if reg == 0:
        return 0.0
    sign = (reg & 2147483648) >> 31 & 1
    exp = ((reg & 2139095040) >> 23) - 127
    if exp == 0:
        man = (reg & 8388607) / pow(2, 23)
    else:
        man = 1 + (reg & 8388607) / pow(2, 23)
    result = pow(2, exp) * man * (sign * -2 + 1)
    return float('{0:.2f}'.format(result))
