I have this code:
In[1]:= H[u_] = 1/2 ((-2 + Erfc[-((5 u)/Sqrt[2])]) Log[ 1 - 1/2 Erfc[-((5 u)/Sqrt[2])]] - (Erfc[-((5 u)/Sqrt[2])] - Erfc[-((3 u)/Sqrt[2])]) Log[ 1/2 (Erfc[-((5 u)/Sqrt[2])] - Erfc[-((3 u)/Sqrt[2])])] - (Erfc[-((3 u)/Sqrt[2])] - Erfc[-(u/Sqrt[2])]) Log[ 1/2 (Erfc[-((3 u)/Sqrt[2])] - Erfc[-(u/Sqrt[2])])] - Erfc[-(u/Sqrt[2])] Log[1/2 Erfc[-(u/Sqrt[2])]]); In[2]:= H[2.1] // Log10 // N[#, 10] & Out[2]= Indeterminate In[3]:= H[Rationalize[2.1, 10^-10]] // Log10 // N[#, 10] & Out[3]= -1.047657131
However, when I do
In[4]:= Plot[(H[Rationalize[u, 10^-10]] // Log10 // N[#, 10] &) // Evaluate, {u, 0, 3}, PlotRange -> All]
I get an incomplete plot; the values of the function for u>1.7 (or so) are apparently left unevaluated:
Out[4]=
How to fix this?