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$

It is because $$(d-1)^2 \le d^2-1 < d^2,$$ so $$d-1 \le \sqrt{d^2-1} < d,$$ so $$\lfloor \sqrt{d^2-1}\rfloor = d-1.$$
