From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by sourceware.org (Postfix) with ESMTPS id 55722385802B for ; Sun, 25 Apr 2021 15:39:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 55722385802B Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lagqy-0000hC-NJ for cygwin@cygwin.com; Sun, 25 Apr 2021 17:39:24 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: cygwin@cygwin.com From: airplanemath Subject: Re: hypotl(LDBL_MAX, 0.0L) = inf Date: Sun, 25 Apr 2021 11:39:17 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (cygwin) Cancel-Lock: sha1:6L6DYNhaXdUr203ivN/efbyoTq8= X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_GOODAOL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Apr 2021 15:39:29 -0000 On Mon, Apr 19 2021, Corinna Vinschen via Cygwin wrote: > On Apr 17 10:02, airplanemath via Cygwin wrote: >> Given that hypot(DBL_MAX, 0.0) = DBL_MAX and hypotf(FLT_MAX, 0.0f) = >> FLT_MAX, I suspect this is a problem in hypotl. Am I missing >> something? > > No. This is a bug in newlib's hypotl. Newlib mainly targest embedded > systems and as such wasn't very much interested in long double > arithmetic for a long time. > > Having said that, there's an easier way out for Cygwin: We just use > the hypotl function from Mingw-w64 for Cygwin as well. > > I pushed this patch and uploaded new developer snapshots to > https://cygwin/snapshots/ > > Please give it a try. Thank you. This fixes that problem and a related one for me. > > > Thanks, Corinna