def testEncryptDecryptFloatSmallNormalNumbers(self):
    logging.debug('Running testEncryptDecryptFloatSmallNormalNumbers method.')
    # small positive numbers
    c_1_0 = _PAILLIER1.EncryptFloat(1.0)
    self.assertEquals(1.0, _PAILLIER1.DecryptFloat(c_1_0))
    c_15_1234 = _PAILLIER1.EncryptFloat(15.1234)
    self.assertEquals(15.1234, _PAILLIER1.DecryptFloat(c_15_1234))
    # small negative numbers
    c_1_0neg = _PAILLIER1.EncryptFloat(-1.0)
    self.assertEquals(-1.0, _PAILLIER1.DecryptFloat(c_1_0neg))
    c_15_1234neg = _PAILLIER1.EncryptFloat(-15.1234)
    self.assertEquals(-15.1234, _PAILLIER1.DecryptFloat(c_15_1234neg))

    # numbers close to 1.0
    # smallest number > than 1.0
    data = 1.0000000000000002
    c_smallest_gt_1 = _PAILLIER1.EncryptFloat(data)
    self.assertEquals(data,
                      _PAILLIER1.DecryptFloat(c_smallest_gt_1))
    self.assertNotEquals(1.0, _PAILLIER1.DecryptFloat(c_smallest_gt_1))
    # smaller than 1.0000000000000002 is rounded to 1.0
    data = 1.0000000000000001
    self.assertEquals(
        1.0, _PAILLIER1.DecryptFloat(_PAILLIER1.EncryptFloat(data)))
    # negative number < than -1.0
    data = -1.0000000000000002
    c_smallest_lt_1neg = _PAILLIER1.EncryptFloat(data)
    self.assertEquals(data,
                      _PAILLIER1.DecryptFloat(c_smallest_lt_1neg))
    self.assertNotEquals(-1.0, _PAILLIER1.DecryptFloat(c_smallest_lt_1neg))
    # negative smaller than -1.0000000000000002 is rounded to -1.0
    self.assertEquals(-1.0,
                      _PAILLIER1.DecryptFloat(_PAILLIER1.EncryptFloat(
                          -1.0000000000000001)))

    # one third
    c_onethird = _PAILLIER1.EncryptFloat(1.0/3.0)
    self.assertEquals(1.0/3.0, _PAILLIER1.DecryptFloat(c_onethird))
    # negative one third
    c_onethird = _PAILLIER1.EncryptFloat(3.0/-1.0)
    self.assertEquals(-1.0/3.0, _PAILLIER1.DecryptFloat(c_onethird))

    # check small fractions close to 0 on the positive and negative side.
    # smallest normal exponent
    smallest_normal = 2**-389
    self.assertEquals(smallest_normal, _PAILLIER1.DecryptFloat(
        _PAILLIER1.EncryptFloat(smallest_normal)))
    # slightly larger than smallest normal exponent
    near_smallest_normal = 1.23456789 * 2**-389
    self.assertEquals(near_smallest_normal, _PAILLIER1.DecryptFloat(
        _PAILLIER1.EncryptFloat(near_smallest_normal)))
    # negative number with smallest normal exponent
    smallest_normal = -2**-389
    self.assertEquals(smallest_normal, _PAILLIER1.DecryptFloat(
        _PAILLIER1.EncryptFloat(smallest_normal)))
    # negative number that has slightly larger than the smallest exponent.
    near_smallest_normal = -1.23456789 * 2**-389
    self.assertEquals(near_smallest_normal, _PAILLIER1.DecryptFloat(
        _PAILLIER1.EncryptFloat(near_smallest_normal)))
dataset/ETHPy150Open google/encrypted-bigquery-client/src/paillier_test.py/PaillierTest.testEncryptDecryptFloatSmallNormalNumbers/swapped operands of `/`