sage: continued_fraction(3*pi)

However, the operation continued_fraction(x) -> continued_fraction(3*x) can be much faster than the above (and 3 * continued_fraction(x) might be a shortcut for that). There is a ticket for that purpose: #19120.