You get
NOTE: coordinate (2Y1.71e0],3Y0.0e0]) has been dropped because it is unbounded
(in y). (see also unbounded coords=jump).
NOTE: coordinate (2Y1.71e0],3Y0.0e0]) has been dropped because it is unbounded
(in y). (see also unbounded coords=jump).
Compute the cube root of 5 like TikZ would.
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\begin{document}
\begin{tikzpicture}
\pgfmathsetmacro{\cuberootoffive}{exp(ln(5)/3)}
\begin{axis}[
xmin=-2.5,
xmax=3,
ymin=-5,
ymax=5,
xlabel={$x$},
ylabel={$y$},
scale only axis,
axis lines=middle,
domain=-\cuberootoffive:3,
samples=200,
smooth,
% to avoid that the "plot node" is clipped (partially)
clip=false,
% use same unit vectors on the axis
axis equal image=true,
]
\addplot [red] {sqrt(x^3+5)};
\addplot [red] {-sqrt(x^3+5)};
\end{axis}
\end{tikzpicture}
\end{document}

There is still a tiny gap, though:

No gap with xfp and the graph is actually correct.
\documentclass{article}
\usepackage{pgfplots}
\usepackage{pgfmath-xfp,xfp}
\pgfplotsset{compat=1.18}
\begin{document}
\begin{tikzpicture}
\edef\cuberootoffive{\fpeval{exp(ln(5)/3)}}
\pgfmxfpdeclarefunction{cubic}{1}{sqrt((#1)^3+5)}
\begin{axis}[
xmin=-2.5,
xmax=3,
ymin=-5,
ymax=5,
xlabel={$x$},
ylabel={$y$},
scale only axis,
axis lines=middle,
domain=-\cuberootoffive:3,
samples=200,
smooth,
% to avoid that the "plot node" is clipped (partially)
clip=false,
% use same unit vectors on the axis
axis equal image=true,
]
\addplot [red] {cubic(x)};
\addplot [red] {-cubic(x)};
\end{axis}
\end{tikzpicture}
\end{document}


domain=-1.709975:3– Sandy G Mar 30 '22 at 15:23