"Raymond Toy" a �crit dans le message news: 4npucpsl3r.fsf@rtp.ericsson.se... > Why is multiplication/division much harder? You pretend the numbers > of integers, do the operation, and then figure out where the fixed > point should be. That's not too hard. As a DSP guy working on > fixed-point DSPs, we do this all the time. > Yes, you "just" have to figure out where the fixed point should be. Note that the result has twice more digits after the point than the original operands. This means that there is some rounding involved, and of course if you want to meet the numerics annex requirements, this should be done right. And did you consider the case where operands are of different fixed point types, with different smalls, and the expected result type is a third fixed point type, or even a floating point type ? And of course, you should consider arbitrary smalls, not just powers of 2... That makes determining the correct rounding of the result more interesting. Of course, it is doable. Compilers do it all the time. But why bother to reinvent the wheel, when the compiler provides a carefully tested implementation ? -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr