i suppose it's fairly well known that if a (continuous, real-valued) function $f$ on the real line satisfies

$f(x-y)=f(x)-f(y)+const$

then it is necessarily linear.

are there any general characterizations of "approximate" linearity? for example, what can be said if $|f(x-y)-f(x)+f(y)-f(0)|$ is bounded by some small $\epsilon$? or, more relevant to what i need, if the $L^2$ norm of this difference is bounded by a small constant? in particular, suppose,

$$E[(f(X-Y)-f(Y)+f(Y)-f(0))^2]\leq\epsilon$$

for a pair of independent random variables $X,Y$. is there a sense in which $f$ is approximately linear?