Extrapolation of definition of derivative from an interval to more general subsets of the real line The following is Rudin's definition in PoMA:
Let $f$ be defined in $[a,b]$. For any $x\in [a,b]$ form the quotient
$$ \phi(t) = \frac{f(t)-f(x)}{t-x} , ~ t\in (a,b)\setminus\{x\}$$
and define $f'(x) = \lim_{t \to x} \phi(t)$. $f$ is differentiable at $x$ if this limit exists.
What is the proper definition for more general subsets, e.g., the whole real line? It can't be it exists such $[a,b]$ since then $|x|$ has a derivative at $0$ if regarded as a function in $\mathbb{R}$. Would enforcing $x$ interior to $[a,b]$ be better?

redacted. See answer
 A: It seems I was a bit too focused in the $\phi$ usage/domain. The $\epsilon-\delta$ interpretation of the limit is a bit more useful here.
If Rudin says $f$ is differentiable at $x$, an interior point of its domain, we can only assume he means that $f_{|[a,b]}$ is for some $[a,b]$ with $x\in(a,b)$ - otherwise it is an ambiguous statement since $|x|$ would have two possible values at $0$. Note that any $[a,b]$ will do, the existence of the limit of the quotient is equivalent for all of them and the value - if it exists- is also equal.
If $x$ is not a limit point of the domain then the only explanation is he meant $f:[x,b]\to R$ or $f:[a,x]\to R$. Again the specific length of these intervals is immaterial for existence/value of the derivative.
This interpretation solves the problem with $(f/g)'=f'g+fg'$: since $g$ is continuous at $x\in [a,b]$ we can find a neighb.(possibly sided) of it in which $g(t)\neq 0$ and $f/g$ is well defined. If $x$ is a extremity of the interval we used the 2nd paragraph, if it is interior then we use the first.
