Related: Finishing math with a period
I believe of the two options
\[|f(x)-(y)|<\epsilon\text{.}\]
or
\[|f(x)-(y)|<\epsilon.\]
the first one is correct. However, a problem that was brought up (link above) is the kerning between the symbol before the period (e.g. a letter Y) and the period itself.
I came up with a funky solution, and my question is to ask the TeX community for a better(?) solution. I say better(?) because it's all subjective; however in my opinion a better solution would use less computation time or use non-LaTeX primitive TeX commands even if the time saved is in the order of milliseconds.
My proposed solution is the following:
\newcommand{\TP}{.\sbox0{$.$}\kern-1.819\ht0\rlap{\color{white}\rule{1.006\ht0}{1.006\ht0}}\kern1.819\ht0\llap{.}}
A downside of this solution is that a color package must be utilized to generate the "white" box which is designed to cover the correctly-kerned math-period so that the text-period can be placed on top. I'm also pretty sure \rlap and \llap are not TeX primitives so there's that too.
EDIT(1) It's been two months, and I think I stumbled on a more aesthetic solution. I also now think \rlap and \llap are indeed TeX primitives because they are mentioned in the TeXbook by Donald Knuth.
\newcommand{\TP}{\kern1.11112pt\llap{.}\kern0pt}
\textnormal{.}. If you don’t like the kerning, add\kern-0.1pt\textnormal{.}.or whatever value looks best to you. – Davislor Dec 29 '20 at 06:05\mathpunct. – Davislor Dec 29 '20 at 06:46\mathpunctI will do some testing with that; much thanks! – Alberto Takase Dec 29 '20 at 07:10\mathpunct{\text{.}}still does not kern properly. It would have been such a nice solution. – Alberto Takase Dec 29 '20 at 07:26\quadInter-letter kerning should not be an issue at all here. – David Carlisle Dec 29 '20 at 11:03