# Fitting an exponential function

I want to graph a part of y = e^{\sqrt{x}} for x up to 10^5. I wrote down the following:

\begin{tikzpicture}[scale=0.8, samples=200]
\draw [thick, <->] (0,5) -- (0,0) -- (8,0);
\node [below right] at (7,0) {$x$};
\node [left] at (0,5) {$y$};
\draw[smooth, thick, domain=0:7] plot (\x, {exp((sqrt(\x)))});


However, even though I look for scaling problems over here, somehow I could not find a way to do it. How can I fix the problem?

• Hello and welcome ! What is the point of plotting such large numbers ? What is your objective ? Apr 23, 2020 at 14:20
• You might try creating a new function using \pgfmathparseFPU, but even if the numbers are calculated accurately, I'm not sure TikZ can handle them. Apr 23, 2020 at 15:13
• @BambOo, I want to intersect my function with another function and they intersect when x =~500 so that is why. My bad. Apr 23, 2020 at 15:33
• What is the second function ? Apr 23, 2020 at 15:38
• I simplifed the exp. function so let us say that it is just the line x = 3500. Apr 23, 2020 at 15:49

Here is a starting point, based on your comments. Note that these large numbers may lead to some numerical problems using latex even with floating point calculations.

\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}

\begin{document}
\begin{tikzpicture}
\begin{axis}
\pgfkeys{/pgf/fpu=true}
\pgfkeys{/pgf/fpu=false}
\end{axis}
\end{tikzpicture}
\end{document}


EDIT taking into account additional style demands

\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}

\begin{document}
\begin{tikzpicture}
\begin{axis}[xlabel={$x$},ylabel={$y$},xtick=\empty,ytick=\empty,axis x line=bottom, axis y line=left,
ylabel style={rotate=-90,at={(ticklabel cs:1)}},xlabel style={at={(ticklabel cs:0.875)}}]
\pgfkeys{/pgf/fpu=true}