From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sourceware.org (Postfix) with ESMTPS id C26343985478 for ; Wed, 16 Sep 2020 08:33:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C26343985478 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.76,359,1592863200"; d="scan'208";a="467954647" Received: from tomate.loria.fr (HELO tomate) ([152.81.10.51]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Sep 2020 10:33:36 +0200 Date: Wed, 16 Sep 2020 10:33:36 +0200 Message-Id: From: Paul Zimmermann To: "Keith Packard" CC: newlib@sourceware.org In-reply-to: <87een3eyq4.fsf@keithp.com> Subject: Re: issue with tgammaf References: <87een3eyq4.fsf@keithp.com> X-Spam-Status: No, score=-4.2 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 Sep 2020 08:33:39 -0000 thank you Keith. For your information I have updated my comparison with Newlib 3.3.0: https://members.loria.fr/PZimmermann/papers/accuracy.pdf The differences with the previous (unknown) version of Newlib I used are that j1 is less accurate (largest error goes from 2.66e6 ulps to 1.68e7 ulps), and y1 is more accurate (largest error goes from 4.65e8 ulps to 6.18e6 ulps). (However, those huge errors simply tell us that j1f is completely off, in the first case for x=0x6.cfd78p+100 j1f returns 0 instead of -0x1p-52.) I am still unable to compile a program using lgammaf: $ cat f.c #include #include #include #include #ifdef NEWLIB /* without this, newlib says: undefined reference to `__errno' */ int errno; int* __errno () { return &errno; } #endif int main (int argc, char *argv[]) { float x = 0x1p-149f; float y = lgammaf (x); printf ("x=%.9e y=%.9e\n", x, y); return 0; } $ gcc -DNEWLIB -no-pie f.c /localdisk/zimmerma/newlib-3.3.0/libm.a /usr/bin/ld: /localdisk/zimmerma/newlib-3.3.0/libm.a(lib_a-wf_lgamma.o): in function `lgammaf': wf_lgamma.c:(.text+0x7): undefined reference to `_impure_ptr' collect2: error: ld returned 1 exit status If someone manages to compile this program on x86_64/Linux, please tell me! Paul