0.6 * 0.7
(0.6+1)*(0.7+1)
((0.6+1)*(0.7+1)) - 1
((0.6+1)*(0.7+1)) - 1 - (0.6 * 0.7)
((0.6+1)*(0.7+1)) - 1 - (0.6 * 0.7) - 0.6
((0.6+1)*(0.7+1)) - 1 - (0.6 * 0.7) - 0.6 == 0.7
import numpy as np
print(np.allclose(((0.6+1)*(0.7+1)) - 1 - (0.6 * 0.7) - 0.6, 0.7))
def an_oddity(a, b):
output = ((a+1)*(b+1)) - 1 - (a*b) - a
#print(output)
return np.allclose(output, b)
an_oddity(0.6, 0.7)
an_oddity(0.8, 0.9)
an_oddity(0.2, 0.9)
all((an_oddity(a,b) for (a,b) in np.random.randn(1000, 2)))