Bug 14996 is spurious overflow of casinh (and so of casin) for large
arguments, when the internal squaring of the argument overflows.
In the calculation of z + sqrt (1 + z*z), for z in the first quadrant,
1 + z*z differs negligibly from z*z (in both modulus and argument) and
so the value (of which the log is taken) differs negligibly from 2*z,
if the modulus of z*z is of the order of 1/epsilon or larger. In this
patch, 1/epsilon is actually used as a threshold on the real and
imaginary parts of z to choose a simpler calculation, since the
epsilon value is conveniently available as a constant whereas
sqrt(epsilon), approximately the least threshold that could be used,
isn't. (Any value whose order of magnitude is between sqrt(epsilon)
and sqrt(max representable value) would be a suitable threshold,
though values close to either end of that range would need more
careful consideration of what exactly the bounds are.)
Tested x86_64 and x86 and ulps updated accordingly.