How can I calculate or approximate the intersection(s)  or lack thereof of a line and an exponential curve.

My goal is to avoid using an approach which first tessellates curves into line segments, and tests each line segment pair. That is O(n^2). I want something which can scale.

I think Lua is appropriate for this, based on evidence in the comments.

```
\documentclass[tikz,border=1cm]{standalone}
\begin{document}
    \begin{tikzpicture}
        \draw[->] (-2,0)  -- (2,0);
        \draw[->] (0,-2)  -- (0,e^2);
        \draw[domain=-2:2] plot (\x,e^\x);
        \draw[domain=-2:2] plot (\x,\x+1.5); % two intersections
        \draw[domain=-2:2] plot (\x,\x+1); % one intersection
        \draw[domain=-2:2] plot (\x,-\x+4.5); % one intersection
        \draw[domain=-2:2] plot (\x,\x); % zero intersections
        % My goal is to use pgfmath to calculate, or if 
        % necessary iteratively approximate, the intersections 
        % of these lines with the exponential curve.
        % If it is not easy in pgfmath, then I want a Lua-based solution.
    \end{tikzpicture}
\end{document}
```

[![output][1]][1]


  [1]: https://i.sstatic.net/pzjj1l8f.png