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 A8A3C21BD1 for ; Sun, 11 Aug 2024 16:01:19 +0200 (CEST) Received: (qmail 21623 invoked by uid 550); 11 Aug 2024 14:01:14 -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 21579 invoked from network); 11 Aug 2024 14:01:14 -0000 Date: Mon, 12 Aug 2024 00:01:01 +1000 (AEST) From: Damian McGuckin To: MUSL Message-ID: <21ca5c9-b1e-71b5-87b-a37f81f691ab@esi.com.au> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Subject: [musl] catan(z) In this routine, there are 2 lines of code t = 0.5 * atan2(2.0 * x, a); w = _redupi(t); The first computes atan2() which returns a number in the range [-pi,+pi] which means that t is a number in the range [-pi/2,+pi/2]. As far as I understand, the routine _redupi(t) accepts a argument and reduces it into the range [-pi, +pi]. Am I mistaken? If I am not wrong, and 't' is already in the range that _redupi(t) will return, then _redupi() just returns its argument (within a rounding error). So it seems like a no-op to me. Can anybody comment? The routine is originally from Moshier's Cephes library. I have Moshier's book but I cannot find any hints there. Thanks - Damian