From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id 81E2E3844046 for ; Tue, 15 Dec 2020 17:11:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 81E2E3844046 Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-562-IuZd4eLWOIGrK9FoNrxsCg-1; Tue, 15 Dec 2020 12:11:38 -0500 X-MC-Unique: IuZd4eLWOIGrK9FoNrxsCg-1 Received: by mail-pj1-f70.google.com with SMTP id gj22so3794807pjb.6 for ; Tue, 15 Dec 2020 09:11:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aAB48EahjR+FHvThVDzb6R8k9y1WbrZ6Ckl2t6rl9jY=; b=DNUFDlvrsV/2oblnItnn/4XdJ87Y70dBUDltRrjt5IOmTFkCIG7UinRei3JdKUic0I mzu0RRbRQaKs+/ls7N91xjiBIf0EYs21OuD9sWFxM7jQ7l2MNwqb/Kin0F2v2JkgOpL/ WfSkQMTHbYPg48AK9hkib0pp+2oC+ifnnKtocafW/KApXH0njXYZ6KanjEi5m1W4izLx Hmkd/FS9wZAIvKBarQEW1DLotRdJVnqASia901uQN4kc5ydV1ZXgvOHA9c68qlHVPF2r zkz5ASCstiEuTktCSjdTXrXp/KUCu7pmIcSCI7YqpmXVQlpOVHLxU8E2Ao0+rKBn4Nvr ZGpg== X-Gm-Message-State: AOAM531dpI+EA1q3PPdeOFzPW71Mt5XQUIXQOVcM9Cq9Y/vE43TomLxF 0GEQCOPUl1imhPDhjyEqYyZ59ZZaxFpkTSqnVnWQmbC9Yir+cKGoG0g2ctO+34eIzjzgKlP83hL Hh4okuc1xMomGTBv5E65VrXJZ5C2yJjY= X-Received: by 2002:a17:90a:6ba4:: with SMTP id w33mr20333515pjj.32.1608052297144; Tue, 15 Dec 2020 09:11:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxysOIYLBGBkeW4mnaDTaEODqk0X39hIGH0BNzx0PxWh5aHq9OwU5DEHuCyoSUS8r4vLEq48f3BN2qWc/8x3zQ= X-Received: by 2002:a17:90a:6ba4:: with SMTP id w33mr20333505pjj.32.1608052296926; Tue, 15 Dec 2020 09:11:36 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jeff Johnston Date: Tue, 15 Dec 2020 12:11:25 -0500 Message-ID: Subject: Re: regression in tgamma? To: Paul Zimmermann Cc: Newlib X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, 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 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Tue, 15 Dec 2020 17:11:42 -0000 Hi Paul, I copied the newlib/libm/common directory and header files from master to a separate directory and called __ieee754_tgamma directly in your test (adding a declaration of __ieee754_tgamma as well). I then built as follows: gcc -g -O0 -I. -DNEWLIB testtgamma.c e_tgamma.c e_exp.c k_sin.c math_err.c er_lgamma.c k_cos.c s_floor.c e_log.c w_log.c I get the same result as you get for 3.3.0. Can you possibly recheck to see if your 4.0.0 library has been built correctly? Perhaps I have somehow by-passed the cause of the problem by compiling directly. -- Jeff J. On Tue, Dec 15, 2020 at 8:36 AM Paul Zimmermann wrote: > Hi, > > while updating my comparison from Newlib 3.3.0 to Newlib 4.0.0, I found a > regression in tgamma on x86_64/Linux: > > $ cat test3.c > #include > #include > > #ifdef NEWLIB > int errno; > int* __errno () { return &errno; } > #endif > > int main() > { > double x = -0x1.53f198fe3b278p+7, y; > y = tgamma (x); > printf ("x=%a y=%a\n", x, y); > } > > Newlib 3.3.0: > $ gcc -DNEWLIB -no-pie test3.c /localdisk/zimmerma/newlib-3.3.0/libm.a; > ./a.out > x=-0x1.53f198fe3b278p+7 y=0x1.fd6d312572d9cp-1015 > > Newlib 4.0.0: > $ gcc -DNEWLIB -no-pie test3.c /localdisk/zimmerma/newlib-4.0.0/libm.a; > ./a.out > x=-0x1.53f198fe3b278p+7 y=0x1p+0 > > Please can someone confirm? > > Best regards, > Paul > >