Skip to main content
Improved introduction of the m variable.
Source Link
Isolin
  • 175
  • 6

(1) Yes, the numbers in fixed point arithmetic are just scaled integers.

(2) No, by a short counterexample. The floating-point arithmetic represents numbers as $r = i \times b^j$. Let us pick a random base, e.g. $b = 10$ and create the smallest positive number $r = 1 \times 10^m$. ObviouslyLet $m < 0$ is be the minimal possible exponent (its size depends on the number of bits assigned to the exponent).

Now the next two numbers are $f(r) = 2 \times 10^m$ and $f(f(r)) = 3 \times 10^m$. After inserting them into your equation $$|(2 \times 10^m - 1 \times 10^m) / 10^m| = 1$$ however $$|(3 \times 10^m - 2 \times 10^m) / (2 \times 10^m)| = 0.5$$

(1) Yes, the numbers in fixed point arithmetic are just scaled integers.

(2) No, by a short counterexample. The floating-point arithmetic represents numbers as $r = i \times b^j$. Let us pick a random base, e.g. $b = 10$ and create the smallest positive number $r = 1 \times 10^m$. Obviously $m < 0$ is the minimal possible exponent (its size depends on the number of bits assigned to the exponent).

Now the next two numbers are $f(r) = 2 \times 10^m$ and $f(f(r)) = 3 \times 10^m$. After inserting them into your equation $$|(2 \times 10^m - 1 \times 10^m) / 10^m| = 1$$ however $$|(3 \times 10^m - 2 \times 10^m) / (2 \times 10^m)| = 0.5$$

(1) Yes, the numbers in fixed point arithmetic are just scaled integers.

(2) No, by a short counterexample. The floating-point arithmetic represents numbers as $r = i \times b^j$. Let us pick a random base, e.g. $b = 10$ and create the smallest positive number $r = 1 \times 10^m$. Let $m < 0$ be the minimal possible exponent (its size depends on the number of bits assigned to the exponent).

Now the next two numbers are $f(r) = 2 \times 10^m$ and $f(f(r)) = 3 \times 10^m$. After inserting them into your equation $$|(2 \times 10^m - 1 \times 10^m) / 10^m| = 1$$ however $$|(3 \times 10^m - 2 \times 10^m) / (2 \times 10^m)| = 0.5$$

Fixed the formulas!
Source Link
Isolin
  • 175
  • 6

(1) Yes, the numbers in fixed point arithmetic are just scaled integers.

(2) No, by a short examplecounterexample. The floating-point arithmetic represents numbers as $r = i \times b^j$. Let us pick a random base, e.g. $b = 10$ and create the smallest positive number $r = 1 \times 10^m$. Obviously $m < 0$ is the minimal possible exponent (its size depends on the number of bits assigned to the exponent).

Now the next two numbers are $f(r) = 2 \times 10^m$ and $f(f(r)) = 3 \times 10^m$. After inserting them into your equation $$|(2 \times 10^m - 10^m) / 10^m| = 1$$$$|(2 \times 10^m - 1 \times 10^m) / 10^m| = 1$$ however $$|(3 \times 10^m - 2 \times 10^m) / 10^m| = 0.5$$$$|(3 \times 10^m - 2 \times 10^m) / (2 \times 10^m)| = 0.5$$

(1) Yes, the numbers in fixed point arithmetic are just scaled integers.

(2) No, by a short example. The floating-point arithmetic represents numbers as $r = i \times b^j$. Let us pick a random base, e.g. $b = 10$ and create the smallest positive number $r = 1 \times 10^m$. Obviously $m < 0$ is the minimal possible exponent (its size depends on the number of bits assigned to the exponent).

Now the next two numbers are $f(r) = 2 \times 10^m$ and $f(f(r)) = 3 \times 10^m$. After inserting them into your equation $$|(2 \times 10^m - 10^m) / 10^m| = 1$$ however $$|(3 \times 10^m - 2 \times 10^m) / 10^m| = 0.5$$

(1) Yes, the numbers in fixed point arithmetic are just scaled integers.

(2) No, by a short counterexample. The floating-point arithmetic represents numbers as $r = i \times b^j$. Let us pick a random base, e.g. $b = 10$ and create the smallest positive number $r = 1 \times 10^m$. Obviously $m < 0$ is the minimal possible exponent (its size depends on the number of bits assigned to the exponent).

Now the next two numbers are $f(r) = 2 \times 10^m$ and $f(f(r)) = 3 \times 10^m$. After inserting them into your equation $$|(2 \times 10^m - 1 \times 10^m) / 10^m| = 1$$ however $$|(3 \times 10^m - 2 \times 10^m) / (2 \times 10^m)| = 0.5$$

Source Link
Isolin
  • 175
  • 6

(1) Yes, the numbers in fixed point arithmetic are just scaled integers.

(2) No, by a short example. The floating-point arithmetic represents numbers as $r = i \times b^j$. Let us pick a random base, e.g. $b = 10$ and create the smallest positive number $r = 1 \times 10^m$. Obviously $m < 0$ is the minimal possible exponent (its size depends on the number of bits assigned to the exponent).

Now the next two numbers are $f(r) = 2 \times 10^m$ and $f(f(r)) = 3 \times 10^m$. After inserting them into your equation $$|(2 \times 10^m - 10^m) / 10^m| = 1$$ however $$|(3 \times 10^m - 2 \times 10^m) / 10^m| = 0.5$$