Computing Stieltjes and log transforms of functions with algebraic endpoint singularities