Here is exp(120000)
:
\documentclass{article}
\usepackage{xintexpr}
\xintDigits := 24;
\xintverbosetrue
\xintdeffloatvar e := `+`(rseq(1{;} (@<1e-24)?{abort}{@/i}, i = 1++));
\begin{document}
\xintthefloatexpr [16] e**120000\relax
\end{document}
This gives 2.176849428771918e52115
. But the pgf manual says
The fpu provides a replacement set of math commands which can be
installed in isolated placed to achieve large data ranges at
reasonable accuracy. It provides at least the IEEE double precision
data range, -10^324...+10^324
This suggests that the exponent 52115 is too big. There is a footnote in the pgf manual saying the exponent is a 32bit integer but it is not clear what that means. I don't know what is the exact maximal exponent, but for comparison the xfp
is limited to 9999
as exponent.
Alternative: don't use loglogaxis.
Hopefully, I got the math right:
\documentclass{article}
\usepackage{pgfplots}
%\usetikzlibrary {spy}
%\usetikzlibrary{fpu}
\begin{document}
\begin{tikzpicture}
% \begin{loglogaxis}[xlabel=$T$,ylabel=$\sigma$,xmin=1e-3, xmax=1e2, ymin=1e-1, ymax=1e18,restrict y to domain=1e-1:1e18]
% \addplot [black,thick,domain=1e-3:1e2, y domain=1e-1:1e18,restrict y to domain=1e-1:1e18, samples=200]{x*(exp(4*10/x)-exp(3*10/x))};
% \addplot[red,thick,domain=1e-3:1e2,y domain=1e-1:1e18,restrict y to domain=1e-1:1e18, samples=400]{x*(exp(12*10/x)-exp(11*10/x))};
% \end{loglogaxis}
% \begin{axis}[xlabel=$\log T$,ylabel=$\log \sigma$,xmin=-3, xmax=2, ymin=-1, ymax=18,restrict y to domain=-1:18]
% \addplot [black,thick,domain=-3:2, y domain=-1:18,restrict y to domain=-1:18,
% samples=200]{x + 40*exp(-x) + ln(1 - exp(-10/exp(x)))};
% \addplot[red,thick,domain=-3:2,y domain=-1:18,restrict y to domain=-1:18,
% samples=400]{x + 120*exp(-x) + ln(1 - exp(-10/exp(x)))};
% \end{axis}
\begin{axis}[xlabel=$\log T$,ylabel=$\log \sigma$,xmin=-3, xmax=2, ymin=5, ymax=50,restrict y to domain=5:50]
\addplot [black,thick,domain=-3:2, y domain=5:50,restrict y to domain=5:50,
samples=200]{x + 40*exp(-x) + ln(1 - exp(-10*exp(-x)))};
\addplot[red,thick,domain=-3:2,y domain=5:50,restrict y to domain=5:50,
samples=400]{x + 120*exp(-x) + ln(1 - exp(-10*exp(-x)))};
\end{axis}
\end{tikzpicture}
\end{document}

I needed to modify completely the (log y) domain to see something of the red curve.
Ah sorry I forgot a log(10) in the domain bounds. Will fix.
Here is with correct domain bounds after using ln
. Apparently I could not use directly ln(10)
in the specs for these, so I used coarse approximation.
\documentclass{article}
\usepackage{pgfplots}
%\usetikzlibrary {spy}
%\usetikzlibrary{fpu}
\begin{document}
\begin{tikzpicture}
\begin{axis}[xlabel=$\log T$,ylabel=$\log \sigma$,xmin=-6.9, xmax=4.6, ymin=-2.3, ymax=41.45,restrict y to domain=-2.3:41.45]
\addplot [black,thick,domain=-6.9:4.6, y domain=-2.3:41.45,restrict y to domain=-2.3:41.45,
samples=200]{x + 40*exp(-x) + ln(1 - exp(-10*exp(-x)))};
\addplot[red,thick,domain=-6.9:4.6, y domain=-2.3:41.45,restrict y to domain=-2.3:41.45,
samples=400]{x + 120*exp(-x) + ln(1 - exp(-10*exp(-x)))};
\end{axis}
\end{tikzpicture}
\end{document}
Of course \log
in the labels is to refer to natural logarithm, not base 10 logarithm.
