0
$\begingroup$

In an past exam paper, one of the questions is to work out the continued fraction representaton of $-\sqrt{2}$.

I worked this out as follows:

$x_0=-\sqrt{2}$, $a_0=[-\sqrt{2}]=-1$ where $[x]$ is the integer part of $x$

$x_1=\tfrac{1}{-\sqrt{2}--1}$, $a_1=[x_1]=-2$

with $a_i=-2$ for $i\geq2$, giving the continued fraction representation as $[-1;\overline{-2}]$

This differs from the model solution as in it, he gives the integer part of $-\sqrt{2}$ as $-2$ and then the continued fraction representation as $[-2;1,1,\overline{2}]$

My question is, why did he set the interger part of $-1.41421....$ as $-2$ and not $-1$, and assuming I'm wrong, when my answer is plugged into a calculator why does it also get very close to $-\sqrt{2}$?

Thank you

  • 0
    Because $-2 \le -\sqrt{2} < -1$.2017-01-09
  • 0
    From what I gathered from a google search, this is using the floor function rather than the ceiling function, is that standard whilst working with continued fractions and integer part of negative numbers?2017-01-09
  • 0
    No idea. Personally I understand the integer part to be the floor, but I see from the Wikipedia that for negative numbers sometimes one uses the ceiling.2017-01-09
  • 0
    "Normal" continued fractions use floor. But there are other flavors of continued fractions. I've seen schemes where the numerator is always 2 instead of 1, or alternates between 1 and -1. I looked around for a reference, but couldn't find on. I can't remember the names of these other flavors. Sorry. Bottom line is that the plain, ordinary way is using floor.2017-01-09

0 Answers 0