From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by sourceware.org (Postfix) with ESMTPS id 937EE3858410 for ; Thu, 11 Nov 2021 17:40:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 937EE3858410 Received: by mail-qt1-x830.google.com with SMTP id n15so6074196qta.0 for ; Thu, 11 Nov 2021 09:40:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GBLAcO56tfulZ7tT5GKLWh15/rTCQ0zwlkQcI+keWvY=; b=BKc+P5jIXmbxfPDieg+MReYpJg7zwrx4dsuf/dSqTm27rtyXHvhh8OZtJCgcqsnglc hn8Hw5ooA6VNY1d9g9kmJgkNvY6YSm+Ay722z7LLz7HAgUm/GzeuW+pe1UenRfeamKLq KfqqXs87zJeXDgIi6fAHpinAnGFlHEum4bJ2qdx6P6a8n5Y82U57i+tO/23hraeIDYBu dBXL31/YtzLgUmaYe65zGxlcwO9V+VVEVgM3/wU11qDFHfW46VWqt1XUHsEnXouwCYb5 o8O8zEzVKn5n7av+ZkKP8MHkMvJ+uiEpQBPtmbzjVNRWHj4nIm6vJYzcUEKWcIidOEsc qtsA== X-Gm-Message-State: AOAM5326V0ObGN9UO8RyVnymtuhmq+9WscDTJlfV96yCdmawnKrm/kj6 PEbUH7bl7oyHidKClg25X2N3UfGs8oO1t/NMVM4= X-Google-Smtp-Source: ABdhPJxM9WJd0xzJRpglMaUVehzEpTN5ZIMn1ptGDK5dHojHSRStENbAuYO7lmsJxlETabFnx2xT5O4PPOlVt0HoZu4= X-Received: by 2002:a05:622a:40a:: with SMTP id n10mr9525818qtx.161.1636652440037; Thu, 11 Nov 2021 09:40:40 -0800 (PST) MIME-Version: 1.0 References: <20211110030726.2468302-1-skpgkp2@gmail.com> <20211110030726.2468302-6-skpgkp2@gmail.com> <20211111103931.GY1982710@arm.com> In-Reply-To: <20211111103931.GY1982710@arm.com> From: Sunil Pandey Date: Thu, 11 Nov 2021 09:40:04 -0800 Message-ID: Subject: Re: [PATCH 5/6] x86-64: Add pow/powf to libmvec microbenchmark To: Szabolcs Nagy Cc: Joseph Myers , andrey.kolesov@intel.com, GNU C Library X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, HK_RANDOM_ENVFROM, HK_RANDOM_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Nov 2021 17:40:41 -0000 On Thu, Nov 11, 2021 at 2:39 AM Szabolcs Nagy wrote= : > The 11/10/2021 19:31, Sunil Pandey via Libc-alpha wrote: > > On Wed, Nov 10, 2021 at 12:27 PM Joseph Myers > > wrote: > > > > > On Tue, 9 Nov 2021, Sunil K Pandey via Libc-alpha wrote: > > > > > > > +# Random inputs in [a=3D0.01,b=3D100.00], [c=3D0.01,d=3D10.00] > > > > > > I think there should be a reasonable proportion of negative exponents= , > > > unless you have evidence that negative exponents are rarely used in > > > practice. (The *first* argument of pow being negative is of use > (produces > > > finite results) in much more limited cases, so may well be much rarer= .) > > > > > > > Negative exponents not used in the input file to avoid denormal > > processing. Negative > > exponent > > may hit the underflow domain when pow(x, -y) produces denormals as > results > > or as intermediate > > values. Both going to touch very slow special pow() path and invokes > Intel > > software assist for > > denormals processing. All of this will distort the overall performance > > result of the main path. > > Also the base argument should be small so that it doesn=E2=80=99t produ= ce > denormals. > > i'd expect typical negative exponents would not > cause subormal computations. > > does powf(100, -10) have intermediate underflow > with the x86 libmvec code? > It may cause intermediate underflow for single precision function, because result get quite close to the underflow domain and intermediate values may be even smaller.