When catan computes __real__ res = 0.5 * __ieee754_atan2 (2.0 * __real__ x, den), the value of den may be inaccurate when close to 0, resulting in an inaccurate real part of the result when __real__ x is also small. For example, catan (0x1p-27 + 1.0i) gives a result with real part 0.785398163397448279 on x86_64, which is only accurate to 8 decimal places, about half the precision expected (the exact value is 0.785398165260093458846617868453411006955...). The same applies to catanh.
Fixed for 2.18 by: commit caf84319c1614d8aa867d8db80219f4e9b1bf735 Author: Joseph Myers <joseph@codesourcery.com> Date: Tue Apr 30 11:27:35 2013 +0000 Fix catan, catanh inaccuracy from atan2 denominators near 0 (bug 15416).