HI,
I have been studying multiplication in the following code,
I have noticed that scaleModSize =50, gives perfect multiplication. However, scaleModSize =59 gives weird multiplication. The outputs are consistent – that is it continues the same for every run. I would like to know the reason behind this fluctuations. The outputs are as follows:
scaleModSize =50
Given vector 1: (0.25, 0.5, 0.75, 1, 2, 3, 4, 5, … ); Estimated precision: 43 bits
Vector 3: (5, 4, 3, 2, 1, 0.75, 0.5, 0.25, … ); Estimated precision: 43 bits
Multiplication of given vector1 with vector3: (1.25, 2, 2.25, 2, 2, 2.25, 2, 1.25, … ); Estimated precision: 41 bits
scaleModSize =59
Multiplication of given vector1 with vector3: (-0.75, 3.70323e-12, 0.25, 3.69937e-12, 3.69349e-12, 0.25, 3.69187e-12, -0.75, … ); Estimated precision: 48 bits
PS: I have noticed that the scaleModSize=59 the multiplication results is the correct multiplication minus 2.
Thanks very much.