An algorithm for computing continuous Chebyshev approximations