For relatively prime positive integers $a>b>1$, it is known that there are uniquely determined integers $a_1,\dots,a_n\geq2$ such that $$\frac{a}{b}=a_1-\frac{1}{a_2-\frac{1}{\cdots-\frac{1}{a_n}}}=:[a_1,\dots,a_n],$$ and this is called the Hirzebruch-Jung continued fraction of $a/b$.
These integers are determined as follows: First write $a=q_1b+r_1$ with $0<r_1<b$ (division algorithm), and put $a_1:=q_1+1$. Now $\frac{a}{b}=a_1-\frac{b-r_1}{b}$. If $b-r_1=1$, then put $a_2=b$ and we are done. Otherwise, continue the process with the pair $(b,b-r_1)$ instead of $(a,b)$.
I was looking for a program / online calculator for computing this, but I couldn't find any Hirzebruch-Jung continued fraction calculators online. (I've only found https://mathoverflow.net/questions/89529/reference-request-program-to-work-with-cyclic-quotient-singularities, but the link in the answer does not work.) I don't know how to code (using matlab, etc.), but I expect that this can be algorithmized to make a program that outputs the integers $a_1,\dots,a_n$ if we input $a$ and $b$. Is there any such program about this?
C++, using ordinary size integers
$$ \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc $$
$$ \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc $$