[cfp-interest 3472] Re: Range error conditions for atan2 and atan2pi

Damian McGuckin damianm at esi.com.au
Mon May 26 16:56:22 PDT 2025


On Mon, 26 May 2025, RAJAN BHAKTA wrote:

> Javier asked that CFP write up and present the correction proposal and 
> the following is the write up (Thank you Jim for doing this!)
> 
> https://wiki.edg.com/pub/CFP/WebHome/C2Y proposal - Clarification of range error condition for atan2-20250525.pdf

There is now an slight inconsistency between atan() and atan2():

atan says:

   ... occurs if nonzero x is too close to zero

atan2 now says:

   ... occurs if x is positive and if y/x is nonzero and too close to zero

The double usage of 'if' is inconsistent with the rest of the standard.

You could keep atan() the same, repeat atan()'s words and put the sense 
of Xavier's change to follow the atan() style text so for atan2/atan2pi:

   ... occurs if nonzero y/x is too close to zero and x is positive (A)

Or additional change atan()/atanpi() that reflect Xavier's words which I 
think is a better constructed sentence.

atan:

   ... occurs if x is nonzero and too close to zero

atan2:

   ... occurs if y/x is nonzero and too close to zero and x is positive (B)
OR
   ... occurs if x is positive and y/x is nonzero and too close to zero (C)

That also avoids having a double usage of 'if'.

Mc 2c - Damian


More information about the cfp-interest mailing list