In the given solution of this Problem in Spivak's "Calculus", 3rd ed., there are some details, which I fail to comprehend. I think that in order to be clear I have to include two images.
There is a short preliminary text on pg. 73., the last part of which reads as follows:
There is one ambiguity about infinite decimals which must be eliminated: Every decimal ending in a string of $9$'s is equal to another ending in a string of $0$'s (e.g., $1.23999...=1.24000...$). We will always use the one ending in $9$'s.
The problem reads as follows:
19. Describe as best you can the graphs of the following functions (a complete picture is usually out of the question). (i) $f(x)=$ the 1st number in the decimal expansion of $x$.
The following are the given solution and my own handwritten solution:
(The dots mean that these ends of the intervals are "closed" and the arrows mean that these ends of the intervals are "open".)
I agree with the part of Spivak's solution which is to the right of the vertical axis. Note that $f(0.2)=1$ because in the preliminary text it is made clear that $0.2000...=0.1999...$. (To be completely rigorous, shouldn't he replace $1$ on the horizontal axis with $0.999...$?)
However, I don't understand the indicated Intervals to the left of the vertical axis in Spivak's solution. Isn't it rather the case that for example $f(-0.1)=0$ because $-0.1000...=-0.0999...$ like I indicated in my solution? Am I missing something about negative real numbers? Technically $0=0.000...$, so is there a way to express $0$ with another number ending in $9$'s?

