This commit is contained in:
Miloslav Ciz 2024-08-06 22:19:44 +02:00
parent 793eff5870
commit 8dbbd1acb0
14 changed files with 1972 additions and 1867 deletions

View file

@ -1,6 +1,6 @@
# Fixed Point
Fixed point arithmetic is a simple and often [good enough](good_enough.md) method of computer representation of [fractional](rational_number.md) numbers (i.e. numbers with higher precision than [integers](integer.md), e.g. 4.03), as opposed to [floating point](float.md) which is a more complicated way of doing this which in most cases we consider a worse, [bloated](bloat.md) alternative. Probably in 99% cases when you think you need floating point, fixed point will do just fine. Fixed point arithmetic is not to be [confused](often_confused.md) with fixed point of a function in mathematics (fixed point of a function *f(x)* is such *x* that *f(x) = x*), a completely unrelated term.
Fixed point arithmetic is a simple and often [good enough](good_enough.md) method of computer representation of [fractional](rational_number.md) numbers (i.e. numbers with higher precision than [integers](integer.md), e.g. 4.03), as opposed to [floating point](float.md) which is a more complicated way of doing this which in most cases we consider a worse, [bloated](bloat.md) alternative. Probably in 99% cases when you think you need floating point, fixed point will do just fine (this is also advocated e.g. in the book *Starting Forth*). Fixed point arithmetic is not to be [confused](often_confused.md) with fixed point of a function in mathematics (fixed point of a function *f(x)* is such *x* that *f(x) = x*), a completely unrelated term.
Fixed point has at least these advantages over floating point: