I need help figuring out the exact number representation to represent time from $1$ nanosecond (ns) to $1000$ seconds (sec) with an accuracy of $1\%$. I know a floating-point is preferred over a fixed point for accuracy reasons, other than that I am not sure at all how to even go about figuring this out.
My try so far:
The relative error is as given $1\% = 1 \times 10^{-2}$ and as such the resolution is $2 \times10^{-2} = 0.02\ ns$.
$1000$ sec = $1\_000\_000\_000\_000 = 10^{12}$ ns
The integer part of the exact number representation I am trying to figure out must be composed of $40$ bits since $2^{40} - 1 = 1\_099\_511\_627\_775 > 1\_000\_000\_000\_000$.
For the fractional part I need to be able to represent $2/100$ and as such I need $7$ bits since it gives that $2/128> 2/100$.
So in total I need $40 + 17 = 57$ bits in the format $40.17$, am I on the right track or am I completely wrong?
Hint: Consider the quantity $(128+a)\times 2^{b-40}$ seconds, where $a$ is an integer in $[0,128)$ and $b$ is an integer in $[0,64)$. It takes $7+6=13$ bits to store the pair $(a,b)$. Which durations are representable in this way?