Skip to main content
2 of 3
stupid error fixed
Roland Bacher
  • 17.9k
  • 3
  • 45
  • 113

André Henriques answer for a closed set $C$ can easily be improved to $C^\infty$ by considering $e^{1/(\alpha-x)+1/(x-\beta)}$ if $x\not\in C$ where $\alpha$ is the supremum of all elements $<x$ in $C$ and where similarly $\beta$ is the infimum of all elements $>x$ in $C$.

Roland Bacher
  • 17.9k
  • 3
  • 45
  • 113