arb-based cosine minpoly calculation