"$\displaystyle g$ is continuous if and only if $\displaystyle g^{-1}(A)$ is open whenever $\displaystyle A\in{\mathbb{R}}$ is an open set."

When is it best to use this definition and what would the steps be to use it?

I was thinking the implication "if $\displaystyle g^{-1}(A)$ is open whenever $\displaystyle A\in{\mathbb{R}}$ is an open set, then $\displaystyle g$ is continuous," might be helpful for counter examples.

For example,

suppose $\displaystyle f:{\mathbb{R}}\rightarrow\\A\in{\mathbb{R}}$ and $\displaystyle f(x)=[[x]]$ (floor function).

Do I have $\displaystyle f^{-1}(V_{\epsilon}(f(c)))$ produceds an open set (where $\displaystyle V_{\epsilon}(f(c))$ is a $\displaystyle \epsilon$-neighborhood centered at some limit point c of the domain of $\displaystyle f$)?

Could I use it to show $\displaystyle f(x)=1/x$ is not coninuous at zero?

I can't find many examples of this characterization of countinuity, so I am finding it hard to work with. I would like to know how to use it for practical continuity problems, as in, showing a particular function is continuous on some interval.

Thanks