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.1 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 2F1CE216D4 for ; Sat, 25 Jan 2025 01:24:45 +0100 (CET) Received: (qmail 18370 invoked by uid 550); 25 Jan 2025 00:24:39 -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 x-ms-reactions: disallow Received: (qmail 18326 invoked from network); 25 Jan 2025 00:24:39 -0000 Date: Sat, 25 Jan 2025 11:24:28 +1100 (AEDT) From: Damian McGuckin To: MUSL Message-ID: MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Subject: [musl] Floating Point Mathematical Constanst in ... This is not specific to MUSL but I figured the knowledge exists in the list. I was doing a review for a small book I am writing. As long as one has defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) the constants M_E M_LOG2E M_LOG10E M_LN2 M_LN10 M_2_SQRT_PI Has anybody been involved in the global 'need' of these constants, i.e. how often they appear in people's code such that the names need to be a global identified as long as one includes both and does the appropriate #defines. The reason I ask is that I cannot find where any of these is used in elementary mathematical libraries such as MUSL. Nor can I find the use of Napier's constant (or Euler's number), i.e. 'e' or M_E, in a few million lines of engineering and physics software to which I have access. The average log() or log2() or log10() programs which one might think could use those logarithm constants instead far more accurate ones instead. I would like to say these constants have very little utility in the average programmer of technical software for engineering or physics but that might be a little extreme. Just curious. Sadly, the people who made that decision at Berkeley in the eighties are quite hard to find these days, most of them enjoying their well-earned retirements. Thanks - Damian