Finding the floor of $\sqrt{d^2-1}$ If we are given $d$ an integer, then I've seen it written that the floor of $\sqrt{d^2-1}=d-1$, but how is this found?
It's not immediately obvious, at least not to me.It makes me feel there must be an algorithm that can be used . 
Would anyone be able to impart their knowledge on how to find the floor of such an expression?
I read it here : Show that the simple continued fraction of $\sqrt{d^2-1}$ is $[d-1; \overline{1, 2d-1}]$ for $d \geq 2$

Saying that $\lfloor\sqrt{ d^2-1}\rfloor=d-1$ amounts to say 
$$
d-1\leq\sqrt{d^2-1}<d. 
$$
The inequality on the right is trivial since $d^2-1<d^2$. For the inequality on the left, 
$$
\sqrt{d^2-1}=\sqrt{(d+1)(d-1)}\geq\sqrt{(d-1)^2}=d-1. 
$$
All that we are using is that $d-1\geq0$ (so that the square root cancels the square) and that $d+1>d-1$. 
