Exercise in floating point arithmetics. How large power can we get?

46 Views Asked by At

Say I have some polynomial

$$P(x) = \sum_{k=0}^n c_kx^k$$

and double precision floating point numbers with mantissa part $53$ bits and exponent part $11$ bits.

What is the largest magnitude of $x$ I can have if I want to evaluate a polynomial of say, order $64$ and all $c_k\in[-1,1]$?

1

There are 1 best solutions below

2
On BEST ANSWER

Assuming IEEE754 double representation (so there is a sign bit on exponent and mantissa), the largest $P$ is $\approx 2^{2^{11-1}}=2^{1024}$, so $x^{64}\approx 2^{1024}$ and hence $x\approx 2^{16}=65536$. This ignores all subtleties about precision of the result depending on the machine implementation, order of operations, etc.