From patchwork Fri Oct 29 17:19:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil Pandey X-Patchwork-Id: 1548154 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=MG+Zgzwk; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Hgr6z14krz9s1l for ; Sat, 30 Oct 2021 05:09:47 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 060733857800 for ; Fri, 29 Oct 2021 18:09:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 060733857800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1635530985; bh=h28iLtNX9cW+7nZK4Wmf6r/LO5tESUeJIz4yHLJpYP4=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=MG+Zgzwk6f+1alprQZa3348WXC1K/vf97dC3VqAHjqlTT8JX/3ow6C+2eVAdrjFGS qYSq8JpgQzRVkPMF6rnRSz/lL4GQncIcI++YYLkdZpm8isKjgAI99E+i+MEUMDp4y2 UC3TL1pJQXCcxHU+qDyg2EprC4AogKxws32qfzSE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by sourceware.org (Postfix) with ESMTPS id 9A831385841E for ; Fri, 29 Oct 2021 18:08:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9A831385841E X-IronPort-AV: E=McAfee;i="6200,9189,10152"; a="316907234" X-IronPort-AV: E=Sophos;i="5.87,193,1631602800"; d="scan'208";a="316907234" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2021 10:19:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,193,1631602800"; d="scan'208";a="498989640" Received: from scymds01.sc.intel.com ([10.148.94.138]) by orsmga008.jf.intel.com with ESMTP; 29 Oct 2021 10:19:43 -0700 Received: from gskx-1.sc.intel.com (gskx-1.sc.intel.com [172.25.149.211]) by scymds01.sc.intel.com with ESMTP id 19THJfMT021212; Fri, 29 Oct 2021 10:19:43 -0700 To: libc-alpha@sourceware.org Subject: [PATCH 12/12] benchtests: Add tanhf function to bench-math Date: Fri, 29 Oct 2021 10:19:41 -0700 Message-Id: <20211029171941.4161172-13-skpgkp2@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211029171941.4161172-1-skpgkp2@gmail.com> References: <20211029171941.4161172-1-skpgkp2@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, HK_RANDOM_ENVFROM, HK_RANDOM_FROM, KAM_DMARC_NONE, KAM_DMARC_STATUS, NML_ADSP_CUSTOM_MED, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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-Patchwork-Original-From: Sunil K Pandey via Libc-alpha From: Sunil Pandey Reply-To: Sunil K Pandey Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" Add tanhf function to bench-math and copy tanhf-inputs to benchtests. Motivation for this patch is to prepare for upcoming libmvec new functions. Float and double version of libmvec functions stays together. tanhf-inputs file generated from tanh-inputs file using following scaling formula: f = d * (FLT_MAX/DBL_MAX) Where d is input(double) and f is output(float). If scaled float value is duplicate in new input file, nextafterf() function used to find next float value, ensuring no duplicates. --- benchtests/Makefile | 1 + benchtests/tanhf-inputs | 203 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 204 insertions(+) create mode 100644 benchtests/tanhf-inputs diff --git a/benchtests/Makefile b/benchtests/Makefile index 8d050d270d..9e81eb8842 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -90,6 +90,7 @@ bench-math := \ sqrt \ tan \ tanh \ + tanhf \ tgamma \ trunc \ truncf \ diff --git a/benchtests/tanhf-inputs b/benchtests/tanhf-inputs new file mode 100644 index 0000000000..e9a641f34e --- /dev/null +++ b/benchtests/tanhf-inputs @@ -0,0 +1,203 @@ +## args: float +## ret: float +## includes: math.h +-0x1.79ea72p-9 +-0x1.94d4ep+3 +-0x1.b63e92p+0 +-0x1.299708p-5 +-0x1.35ec26p-19 +-0x1.d139c6p-49 +-0x1.ba38b6p-6 +-0x1.83f902p+3 +-0x1.dc3722p-51 +-0x1.922cb4p-3 +0x1.357956p+1 +0x1.3d52b2p+3 +-0x1.f7e794p-7 +-0x1.3f96b4p+0 +-0x1.a82266p+1 +-0x1.ced122p+0 +0x1.e4e264p-4 +0x1.8c5fdp-40 +0x1.c1b892p+0 +-0x1.223b8p-33 +0x1.718468p-41 +-0x1.8a4422p-1 +-0x1.67e982p-41 +-0x1.368b8p+1 +-0x1.663534p-39 +0x1.1aa844p-18 +-0x1.d70654p-43 +0x1.c84f96p+2 +-0x1.f327d6p-9 +0x1.212b32p-49 +0x1.62533p+3 +0x1.ca2524p-32 +0x1.d502b8p+2 +-0x1.5c6892p-29 +-0x1.c05afp+0 +-0x1.3f35f8p+4 +0x1.f71314p+1 +0x1.ffb1ep+2 +0x1.cad8c2p-32 +-0x1.ff34f2p-3 +0x1.6156d8p-53 +-0x1.4b5a84p+0 +0x1.c22fd4p+3 +0x1.3fa1e6p+2 +-0x1.90f3f6p-52 +0x1.0d16c6p+1 +0x1.421a76p+1 +-0x1.4b251p+3 +0x1.ac89b6p+0 +-0x1.f5a006p+1 +0x1.263f96p-25 +-0x1.81c16p+2 +-0x1.4c0a56p+4 +-0x1.2c2e34p-47 +-0x1.b57eb4p-21 +-0x1.53a808p-39 +0x1.535964p-43 +-0x1.d049e6p-23 +-0x1.ad3f88p+1 +-0x1.b95594p-35 +0x1.480e54p-33 +0x1.9f8f62p-54 +-0x1.80ed54p+2 +0x1.0a15bp-42 +-0x1.2700a6p+3 +0x1.825744p-42 +-0x1.a96978p+1 +0x1.0fbf54p-16 +-0x1.68dc34p+0 +-0x1.08c496p+1 +0x1.7112c2p+1 +0x1.45aa62p-13 +0x1.243186p+1 +0x1.2712f6p-52 +0x1.cd7698p-32 +0x1.9ab284p-15 +0x1.9cf328p-21 +0x1.dccc32p-48 +-0x1.b2a4e6p+0 +-0x1.9802a6p+0 +0x1.3da496p-27 +-0x1.d46704p-50 +0x1.12d69p-25 +0x1.347632p-39 +-0x1.2f5428p+1 +-0x1.44a7fp-18 +0x1.c95486p-45 +0x1.c9922p+3 +0x1.a067b2p+2 +-0x1.4cfdd4p-10 +0x1.509082p-43 +0x1.bbbc04p-34 +-0x1.d7973p+1 +0x1.4aeba2p-11 +0x1.721152p+2 +-0x1.3a4016p+3 +0x1.555714p-37 +0x1.a877a8p-46 +0x1.ba8ad2p-6 +0x1.e500b2p+0 +-0x1.7c7802p+1 +-0x1.89c342p-21 +-0x1.9653b8p+1 +0x1.cbc546p+1 +0x1.80dd34p-29 +0x1.a8861p-35 +0x1.3bf708p+1 +-0x1.58fc26p-51 +0x1.99f184p-37 +0x1.a5c078p+3 +0x1.1676a2p-31 +-0x1.151f62p+0 +-0x1.82b124p-21 +-0x1.9c78a8p+2 +0x1.81db56p+0 +-0x1.403546p+3 +-0x1.884176p-5 +-0x1.8cd808p+2 +0x1.28b7d4p-16 +-0x1.dbdfc6p+3 +-0x1.93ca44p+2 +-0x1.863014p-40 +0x1.6f0606p-48 +0x1.e4bbp+0 +0x1.4e7cd6p-22 +0x1.d82514p+0 +0x1.08ea66p-4 +-0x1.4eb052p+3 +-0x1.94754p-38 +-0x1.9d4c18p-18 +0x1.ffdc34p+3 +-0x1.f01e86p-45 +-0x1.040acp-37 +0x1.deca68p+3 +0x1.7ea616p-31 +-0x1.5ad552p+1 +-0x1.184778p+2 +-0x1.da6836p+1 +0x1.d47856p-32 +-0x1.8dff62p+2 +0x1.512c92p-42 +0x1.0d46e6p-38 +-0x1.f2cba4p+3 +-0x1.1bd606p+1 +-0x1.314a92p+1 +0x1.78e992p+3 +0x1.547ba4p+1 +-0x1.10b636p+1 +0x1.2bc994p-3 +-0x1.8edd86p+3 +-0x1.0f5bf4p-54 +0x1.e38d84p-43 +-0x1.9c3138p-25 +-0x1.01ea82p+3 +0x1.b68126p-9 +-0x1.49f406p+0 +-0x1.72a778p-8 +0x1.198eap+1 +-0x1.ecc604p-21 +-0x1.e649cp+3 +0x1.06f164p+0 +-0x1.693d86p-10 +-0x1.008746p+1 +-0x1.05519p-51 +-0x1.df8af6p+2 +-0x1.fa5552p-13 +0x1.5d5fap-9 +0x1.726ff6p+2 +-0x1.17fe02p+2 +0x1.261da4p-35 +-0x1.55b502p+1 +-0x1.5b3682p+2 +-0x1.2e7716p-16 +0x1.5be034p+0 +-0x1.b530c4p+2 +0x1.b3c984p-50 +0x1.9286b6p+3 +0x1.106138p+2 +0x1.df2ad2p-26 +-0x1.1ae766p+4 +0x1.1cecd8p+4 +0x1.e1619p-48 +-0x1.43ad34p+3 +0x1.f978d6p+2 +0x1.340976p+2 +0x1.2ca3d4p+3 +-0x1.75fb14p+0 +0x1.1c6be4p+4 +0x1.1b5488p+0 +-0x1.73c328p-33 +0x1.0e0354p-54 +-0x1.168b02p+1 +-0x1.816c54p-45 +-0x1.ee867p+2 +-0x1.137d5p+1 +0x1.094c26p-22 +0x1.87a6a4p-37 +0x1.9c4674p-9 +0x1.2ba8d8p-43 +0x1.35e724p+4