From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sourceware.org (Postfix) with ESMTPS id 7FEEE38350AB for ; Wed, 16 Dec 2020 13:48:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7FEEE38350AB Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=inria.fr Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Paul.Zimmermann@inria.fr X-IronPort-AV: E=Sophos;i="5.78,424,1599516000"; d="scan'208";a="367850461" Received: from tomate.loria.fr (HELO tomate) ([152.81.10.51]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Dec 2020 14:48:55 +0100 Date: Wed, 16 Dec 2020 14:48:55 +0100 Message-Id: From: Paul Zimmermann To: newlib@sourceware.org Subject: regression in tgamma? X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Dec 2020 13:48:57 -0000 Hi, the regression I observed also concerns the binary32 code. Consider the following code: $ cat /tmp/test_tgamma.c #include #include #ifdef NEWLIB int errno; int* __errno () { return &errno; } #endif int main() { float x = -0.0f; float y = tgammaf (x); printf ("x=%a y=%a\n", x, y); { double x = -0x1.53f198fe3b278p+7, y; y = tgamma (x); printf ("x=%a y=%a\n", x, y); } } With commit a0d7982ff486292540078c0121a435013c5ee1ea it gives on x86_64/linux (Intel(R) Core(TM) i5-4590): $ gcc -no-pie -DNEWLIB /tmp/test_tgamma.c build/x86_64/newlib/libm/tmp/libm.a $ ./a.out x=-0x0p+0 y=inf x=-0x1.53f198fe3b278p+7 y=0x1.fd6d312572d9cp-1015 and with commit 1f8e5847dff27e504949cd21bfeadb987d36ad19: $ gcc -no-pie -DNEWLIB /tmp/test_tgamma.c build/x86_64/newlib/libm/tmp/libm.a $ ./a.out x=-0x0p+0 y=0x1p+0 x=-0x1.53f198fe3b278p+7 y=0x1p+0 Paul