ENH: speed up logcosh