Altera_Forum
Honored Contributor
15 years agolpm_divide remainder result
My thread is mainly on the remainder output from the lpm_divide.
I am using the lpm_divide megafunction for diving two 16 bit fixed point numbers and the denominator is always greater than or equal to the numerator. Meaning, the result of the division in my case would be less than 1 90% of the time. The quotient of the megafunction would give either a 0 or 1. But what about the remainder? For example, (0.25 / 0.50) * (2^15/2^15) = 8192/16384 using lpm_divide would give a quotient 0. But would the remainder be simply 8192? Thanks in advance for the help.