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

RAJAN BHAKTA rbhakta at us.ibm.com
Wed May 14 09:53:48 PDT 2025


CFP met today and discussed this. We agree with your first point and are good with the proposed new text (the part after “It should read”).

Please feel free to bring this forword as a proposal to WG14, or if you prefer, let CFP know and we can do it.

Regards,


From: cfp-interest <cfp-interest-bounces at oakapple.net> on behalf of Javier Múgica <javier at aerotri.es>
Date: Sunday, April 13, 2025 at 10:11 PM
To: cfp-interest <cfp-interest at ucbtest.org>, jaswthomas <jaswthomas at sbcglobal.net>
Subject: [EXTERNAL] [cfp-interest 3431] Range error conditions for atan2 and atan2pi
I have come across the condition for domain error and range error for several functions, and I bring to points to your attention:

--------- 1st

atan2:

The atan2 functions [...]. A domain error may occur if both arguments are zero. A range error occurs if x is positive and nonzero y/x is too close to zero.

The last sentence reads, in English, "A range error occurs if (x is (positive and nonzero) y/x is too close to zero)."

and there seems to be a missing "and". But reading the analogous sentence for other functions, e.g., atan:

The atan functions compute the principal value of the arc tangent of x. A range error occurs if nonzero x is too close to zero.

one can guess the intended meaning. It should read:

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

--------- 2nd

Why "positive"? Considering that atan2 is an odd function, +x and -x should give +alpha and -alpha uniformly. The "atan", "sin", "tan", etc. functions don't make this distinction. Its presence in atan2 and atan2pi seems spurious.
This distinction is present in exponential functions, but there it makes sense.


Regards,

Javier Múgica

_______________________________________________
cfp-interest mailing list
cfp-interest at oakapple.net
http://mailman.oakapple.net/mailman/listinfo/cfp-interest 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20250514/746370a8/attachment-0001.htm>


More information about the cfp-interest mailing list