How can I solve the following problem with floor functions? 
Ideally I'd like to find an analytical solution, though I doubt one exists. If an analytical doesn't exist, any insight into tackling this problem numerically would be greatly appreciated. I can't think of anything other than naive brute-force.

Given $c$, find $x$ such that $y$1$=$$y$2$=$$d$.
$$y_1 = (x+h)-\lfloor x + h \rfloor$$
$$y_2 = \frac{(-x \cdot s)}{(x+s)} + h - \left \lfloor \frac{(-x \cdot s)}{(x+s)}+h \right \rfloor$$
where,
$$c \in \mathbb{Z^+}$$
$$s=\sqrt c $$
$$d=s-\lfloor s \rfloor$$
$$h=2 \cdot d- \lfloor 2 \cdot d \rfloor$$
For example,
Given $c=77$,
$$s=\sqrt c \approx 8.775$$
$$d=s-\lfloor s \rfloor \approx 0.775$$
$$h=2 \cdot d- \lfloor 2 \cdot d \rfloor \approx 0.550$$
Dot notation is just scalar multiplication.
Here's what this problem looks like visually.

where the black line is $y_1$, the red line is $y_2$, the blue line is $d$ and the red arrow is pointing to the $x$ that satisfies the condition. In this case $x \approx 2.225$.
So what we have is essentially two sawtooth waves, $y_1$ with a period of $1$ and $y_2$ with a period that decreases non-linearly as a function of $x$ and I'm looking for the $x$ at which both lines equal $d$.
Since $x$ has a period of $1$, we know that the intersection will have to occur at some $x$ with fractional part $1-d$.
Brute-forcing won't be sufficient since this needs to work for extremely large $c$. So, without an analytical solution I'm trying to find some way to attack this problem numerically but can't find any way to narrow scope.
 A: Define $\{x\} = x - [x]$ for $x \in \mathbb{R}$, then$$
d = \{\sqrt{c}\}, \quad h = \{2d\}.
$$
For $c \in \mathbb{N}_+$, suppose $m \in \mathbb{N}_+$ satisfies $m^2 \leqslant c < (m + 1)^2$. Note that $\displaystyle c \neq \left(m + \frac{1}{2}\right)^2$ since $c \in \mathbb{N}_+$.
Case 1: $\displaystyle m^2 \leqslant c < \left(m + \frac{1}{2}\right)^2$. In this case,$$
d = \{\sqrt{c}\} = \sqrt{c} - m \in \left(0, \frac{1}{2}\right), \quad h = \{2d\} = 2d.$$
Because$$
\{x + h\} = d, \quad \left\{-\frac{\sqrt{c} x}{x + \sqrt{c}} + h\right\} = d,
$$
there exist $n_1, n_2 \in \mathbb{Z}$ such that$$
d = x + h - n_1, \quad d = -\frac{\sqrt{c} x}{x + \sqrt{c}} + h - n_2,
$$
which imply $x = n_1 + d - h = n_1 - d$ and\begin{align*}
n_2 &= h - d - \frac{\sqrt{c} x}{x + \sqrt{c}} = d - \frac{\sqrt{c} (n_1 - d)}{n_1 - d + \sqrt{c}}\\
&= (\sqrt{c} - m) - \frac{\sqrt{c} (n_1 - (\sqrt{c} - m))}{n_1 - (\sqrt{c} - m) + \sqrt{c}}\\
&= \sqrt{c} - m - \frac{\sqrt{c} (n_1 + m - \sqrt{c})}{n_1 + m} = \frac{c}{n_1 + m} - m.
\end{align*}
Note that $c, n_1, n_2$ are all integers, so each solution $x$ one-one corresponds to an integer $n_1$ such that $n_1 + m \neq 0$ and $n_1 + m | c$. Hence all solutions are$$
x = n_1 - d = (n_1 + m) - (m + d) = k - \sqrt{c},
$$
where the integer $k$ divides $c$.
Case 2: $\displaystyle \left(m + \frac{1}{2}\right)^2 < c < (m + 1)^2$. In this case,$$
d = \{\sqrt{c}\} = \sqrt{c} - m \in \left(\frac{1}{2}, 1\right), \quad h = \{2d\} = 2d - 1.$$
Because$$
\{x + h\} = d, \quad \left\{-\frac{\sqrt{c} x}{x + \sqrt{c}} + h\right\} = d,
$$
there exist $n_1, n_2 \in \mathbb{Z}$ such that$$
d = x + h - n_1, \quad d = -\frac{\sqrt{c} x}{x + \sqrt{c}} + h - n_2,
$$
which imply $x = n_1 + d - h = n_1 - d + 1$ and\begin{align*}
n_2 &= h - d - \frac{\sqrt{c} x}{x + \sqrt{c}} = d - 1 - \frac{\sqrt{c} (n_1 - d + 1)}{n_1 - d + 1 + \sqrt{c}}\\
&= (\sqrt{c} - m) - 1 - \frac{\sqrt{c} (n_1 - (\sqrt{c} - m) + 1)}{n_1 - (\sqrt{c} - m) + 1 + \sqrt{c}}\\
&= \sqrt{c} - m - 1 - \frac{\sqrt{c} (n_1 + m + 1 - \sqrt{c})}{n_1 + m + 1} = \frac{c}{n_1 + m + 1} - m - 1.
\end{align*}
Note that $c, n_1, n_2$ are all integers, so each solution $x$ one-one corresponds to an integer $n_1$ such that $n_1 + m + 1\neq 0$ and $n_1 + m + 1 | c$. Hence all solutions are$$
x = n_1 - d + 1 = (n_1 + m + 1) - (m + d) = k - \sqrt{c},
$$
where the integer $k$ divides $c$.
