OpenCores

Fixed Point Arithmetic Modules

Issue List
Fixed point arithmetic addition #1
Open raghava216 opened this issue about 11 years ago
raghava216 commented about 11 years ago

Hi! I have seen the code for fixed point addition.

There is an error in the code. When 64.125 and 0.75 are added, the result is 64.200 instead of 64.875. The numbers in the fraction field '125' and '75' are added just like integers and the result is reported as '200'. They need to considered as fractions '0.125' and '0.75' and added to get the correct result '0.875'.

Please correct the code.

raghava216 commented about 11 years ago

This is about the 5th test case given in the 'qadd_tf' module.

a31:23 = 64; a22:0 = 125; b31:23 = 0; b22:0 = 75;

does this mean a = 64.125 and b = 0.75


Assignee
No one
Labels
Bug