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 809D13858D39 for ; Wed, 8 Feb 2023 07:02:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 809D13858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=inria.fr Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=inria.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:message-id:from:to:cc:in-reply-to:subject: references; bh=wW44jpNzvZ/oqUwKEgDsiS+acv4kjUAownb/LabWHwE=; b=atmwEXwd4MlJdsIAJu9hQa4BV/uA4AByllWVuwpVvPfQC2EGTeD4kSBq 40yiSIgV8dYL+BoOkaQ5UVgS0cIwGrsfnNpUesxCBjKd85VwurODRk/E8 TpLAGf+LVUMuFoE8U3OWMLXJDle+gYnEEVQ56SGLddh41gYlx1wdbo57w 8=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=Paul.Zimmermann@inria.fr; spf=None smtp.helo=postmaster@coriandre Received-SPF: SoftFail (mail2-relais-roc.national.inria.fr: domain of Paul.Zimmermann@inria.fr is inclined to not designate 152.81.9.227 as permitted sender) identity=mailfrom; client-ip=152.81.9.227; receiver=mail2-relais-roc.national.inria.fr; envelope-from="Paul.Zimmermann@inria.fr"; x-sender="Paul.Zimmermann@inria.fr"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:128.93.142.0/24 ip4:192.134.164.0/24 ip4:128.93.162.160 ip4:89.107.174.7 mx ~all" Received-SPF: None (mail2-relais-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@coriandre) identity=helo; client-ip=152.81.9.227; receiver=mail2-relais-roc.national.inria.fr; envelope-from="Paul.Zimmermann@inria.fr"; x-sender="postmaster@coriandre"; x-conformance=spf_only X-IronPort-AV: E=Sophos;i="5.97,280,1669071600"; d="scan'208";a="91640366" Received: from coriandre.loria.fr (HELO coriandre) ([152.81.9.227]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2023 08:02:15 +0100 Date: Wed, 08 Feb 2023 08:02:14 +0100 Message-Id: From: Paul Zimmermann To: Jeff Johnston Cc: newlib@sourceware.org, vincenzo.innocente@cern.ch In-Reply-To: (message from Jeff Johnston on Tue, 7 Feb 2023 16:48:14 -0500) Subject: Re: huge error for pow References: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Jeff, this would not make sense on our side, since in CORE-MATH we are currently completing a correctly rounded pow function, which will be available in a few weeks, and can then be integrated into newlib. Best regards, Paul > From: Jeff Johnston > Date: Tue, 7 Feb 2023 16:48:14 -0500 > Cc: newlib@sourceware.org, vincenzo.innocente@cern.ch > > > [1:text/plain Show] > > > [2:text/html Hide Save:noname (1kB)] > > Thanks Paul, > > Do you think you can put together a patch? > > -- Jeff J. > > On Tue, Feb 7, 2023 at 9:27 AM Paul Zimmermann > wrote: > > Hi, > > while testing Newlib 4.3.0, I noticed the following huge error: > > zimmerma@salade:~/svn/tbd/20/src/binary64$ VERBOSE=-v ./doitb.newlib pow > 1000 > Checking pow with newlib-4.3.0.20230120 > Using seed 1619945 > pow 0 -1 -0x1.647ff80007ff8p-576,-0x1.3d018267f12fp+48 [inf] inf inf > libm gives inf > mpfr gives -inf > > The exponent y in x^y is a large odd integer, thus since x is negative > we > should get a negative number as result. > > This issue was apparently already present in 3.3.0, but we only > discovered > it now. > > Best regards, > Paul