10.26.2011

The little mistake

Ahh, yes. I see where fixpoint formats may be unsuitable for my case. See, it's awesomely fast when using usigned numbers and does actually work very well with it. But the problem is that, if there's no negative range, I can't check whether a translation went out of range and won't be able to clip it properly. I could use Wikipedia implementation suggestion of the Q number format, but that's rather a bad idea because it suffers from distinct precision loss and unwanted rounding behaviour. What I'd want to have is a fixpoint format having a signed pre-comma part and an unsigned post-comma part. But due to the fact that it's not unsigned and that a decision is required to somehow involve the sign, it won't work as expected.

So this is it, fixpoint calculation with no sign value I guess. Also, over and underflow is rather impossible to check using it (didn't dig too much into it). The benefit is awesome, but I need to compensate the sign problem with them. Guess I'll have to seperate pre and post parts every time I do a calculation. And I guess that those few operations are still faster than a float addition plus conversion.

No comments: