The OpenBSD catan implementation we're using has a number of nonsensical "overflow" (goto ovrf) conditions that aren't errors, reported by mepholic on irc. I think the attached patch fixes them without introducing new problems, but I'm not sure if any other problems remain. Note that, of the three cases removed: 1. Is not an exceptional case at all, and made no sense to begin with. 2. Is only exceptional if x and a are both zero; atan(2x,0) is perfectly well-defined. 3. Is only possible if y==1.0 and x==0.0, which is the only real exceptional case for atan: z==I. I opted to replace the non-obvious (3) with an explicit check for z==I but this isn't necessary. As written the patch does not address raising exception flags; that should be fixed before it's committed but right now I'm just submitting this for comments. Prior to the patch, at least the following (utterly dumb -- the first is a very real input!) cases are broken: - catan(1.0) - catan(2*I) - catan(I) Rich