I came across this quote:
"Every continued fractions $a_1, a_2, ..., a_n$ can be transformed to a unique canonical form $\beta_1, \beta_2, ...., \beta_m$, where all $\beta$ 's are positive or all negative integers and $m$ is odd."
Page 14 of this document:
What is the system to turn a continued fraction with a negative denominator into an equivalent continued fraction with all denominators positive? Can I get an example?
At least in some cases you can make the following transformation:
$$ \frac{\dots}{a + \frac{1}{-b + \frac{1}{\dots} }} = \frac{\dots}{a -1 + \frac{b-1-\frac1\dots}{b - \frac1\dots }} = \frac{\dots}{a -1 + \frac{1}{1+\frac{1}{b-1-\frac1\dots}}}$$
So you have substitued $$\dots,a,b,\dots\quad\quad \text{by}\quad\quad \dots,a-1,1,b-1,-(\dots)$$ But now you have to be careful with the remainder of the continued fraction as it is now negative (you might repeat the same trick). You have also to be careful if $a=1$ or if $b=1$ or both.
Surely there is a better method!