Forum Discussion
Altera_Forum
Honored Contributor
11 years agoFloating point is most likely not the best solution for your problem, a 8.8 fixed point number sounds like a better idea. You easily get it by multiplying the dividend with 256 before the division.
8 fractional bitsis just a first guess, you have to find out the required accuracy for your problem. I notice that your ideal result is already several percent off by truncating the divisor of 12.5 to 12. Of course, this point could be corrected in a fixed point algorithm, too.