Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

(I don't know if this is the right place to post this, if not sorry and can it be moved to the right site please)

Under what circumstances would fixed point representation be used rather than floating point?

share|improve this question

closed as off topic by slhck, sleske, random May 30 '11 at 16:44

Questions on Super User are expected to relate to computer software or computer hardware within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
See this and this question on Stack Overflow –  slhck May 30 '11 at 15:27
    
Thank you...... –  orange May 30 '11 at 15:29

2 Answers 2

up vote 1 down vote accepted

It really depends on CPU architecture, but it would generally be used for either:

  • Improvements in performance

  • Cases where the target platform does not have a floating point unit (FPU)

Many embedded devices do not have an FPU and would make use of fixed point representation. On some architectures, using fixed point would also provide noticeable performance improvements.

share|improve this answer

If your target architecture has no (or a slow) floating point unit (for example, many DSPs) then fixed-point will be potentially much faster to compute.

Some algorithms behave very badly when floating point is used. For example, if you end up trying to add very small numbers to very large numbers, the small numbers can look like zeros and the update doesn't make any difference. This can have major knock-on effects.

This is well worth a read: What Every Computer Scientist Should Know About Floating-Point Arithmetic

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.