From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id 33A9124D6B for ; Mon, 12 Aug 2024 05:56:33 +0200 (CEST) Received: (qmail 3756 invoked by uid 550); 12 Aug 2024 03:56:28 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 3724 invoked from network); 12 Aug 2024 03:56:28 -0000 Date: Mon, 12 Aug 2024 13:56:18 +1000 (AEST) From: Damian McGuckin To: MUSL In-Reply-To: <7e9463-98a3-4b2-c10-e3fbf79a6b8@esi.com.au> Message-ID: <5918d2a7-7b3-932b-2b4-b24390832244@esi.com.au> References: <21ca5c9-b1e-71b5-87b-a37f81f691ab@esi.com.au> <20240811200812.GZ3766212@port70.net> <7e9463-98a3-4b2-c10-e3fbf79a6b8@esi.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Subject: Re: [musl] catan(z) On Mon, 12 Aug 2024, Damian McGuckin wrote: > There is some argument that if you handle the special cases at infinity > separately (which I think MUSL should do but I do not have time at the > moment), then one can assume that because pi/2 is irrational, then one > should never have to deal with the end points in the chunk of code where > those two lines of code seen above should appear. I will have a chat > sometime with the guy who wrote that logic in a WG14 paper when I get a > really clear head and can line him up. Consider atan2(y, x) For any finite y and finite non-zero x floating point number arguments, i.e. rational numbers, the result of atan2(y, x) must be rational and so is never +/- pi (which is irrational and only occurs when the ration y/x is a mathematical infinity, not an overflowing infinity). So, we can ignore the endpoints as long as our special case handling takes care of the case of zero x. I think that is correct .... or is my brain still not working properly after too many late nights watching the Olympics. Thanks - Damian