The basic idea is to transform dot product into log form:
log(a.b) = log(a1*b1 + a2*b2 + ... + an*bn)
= log(exp(log a1+log b1) + exp(log a2+log b2) + ... + exp(log an+log bn))
and then apply something like Horner's method, but for exp-s, so result looks like (I'll simplify log a1 to la1, log a2 to la2, ...):