From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by sourceware.org (Postfix) with ESMTPS id 1839C383E83C for ; Sun, 14 Jun 2020 17:58:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1839C383E83C Received: by mail-lf1-x141.google.com with SMTP id u25so1684420lfm.1 for ; Sun, 14 Jun 2020 10:58:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:references:to:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=HYz4GFMTJHd3X+6f+PcjOqnAxHlrq2jAVtCZTh137Uc=; b=uVF/f1KT/+6CxdkfsRujaVFvqXD5htnO/RDu3htCQLlR7qwawgiSzazzF4mH4+PdRR rv7W3eYNjDr/Ask7fOczANDVTtJMDp1ZeLBY4YqUOKgYpimOOkt1Bv1AjxfzRvBwV24D JMLn7tzWkACFNc5swbulE1CikWhBTJ9ZsisHPPVTyuHF8SV+9hhu1NPjIQg2fyIrJ4dT 7+7QNrWYhcJQUts2gf9SF/8LMaGVgUvx2U33/yXFd3K/omiNxhkg5GP5/Q7AwTgN8+JL B97zFOtK5chQ+AUqcB4XXJBWmtGTSEU2JXxJXfrE+riYFqwv7n6T24hgcCOpn8SDSoLN nBww== X-Gm-Message-State: AOAM532cSDBTan/NuuwDNUfTn3lDWLEm9C7YHGTdbLG+CmgcF1uq02VJ NAvevWFrjFUfGQ7oCKn3Xm576QMS+7k= X-Google-Smtp-Source: ABdhPJwLF58gOvKxB1QH0bmEPFx5jqFLxDpxERYeeybuTFiMbL9lPWlWtgWiwyzMNT0OvzhaYsD2kw== X-Received: by 2002:a19:2358:: with SMTP id j85mr11853876lfj.182.1592157513533; Sun, 14 Jun 2020 10:58:33 -0700 (PDT) Received: from ?IPv6:2a02:a310:c063:7700:f175:c5ef:44cd:b388? ([2a02:a310:c063:7700:f175:c5ef:44cd:b388]) by smtp.gmail.com with ESMTPSA id 144sm1368846lfm.87.2020.06.14.10.58.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 14 Jun 2020 10:58:32 -0700 (PDT) Subject: [PATCH] Add `exp10l` function. References: <20200614175603.1308706-1-kamilcukrowski@gmail.com> To: newlib@sourceware.org From: Kamil Cukrowski X-Forwarded-Message-Id: <20200614175603.1308706-1-kamilcukrowski@gmail.com> Message-ID: <14d184e0-4234-3810-0ae8-14b1f000addd@gmail.com> Date: Sun, 14 Jun 2020 19:58:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20200614175603.1308706-1-kamilcukrowski@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: pl-PL X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, 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: Sun, 14 Jun 2020 17:58:37 -0000 There are many functions available in `libm` that have `l` suffix for `long double`, but `exp10l` is missing while `exp10` and `exp10f` are provided. This patch adds missing `exp10l` function. Signed-off-by: Kamil Cukrowski --- newlib/libm/common/exp10l.c | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 newlib/libm/common/exp10l.c diff --git a/newlib/libm/common/exp10l.c b/newlib/libm/common/exp10l.c new file mode 100644 index 000000000..5454fbbd3 --- /dev/null +++ b/newlib/libm/common/exp10l.c @@ -0,0 +1,42 @@ +/* +(C) Copyright IBM Corp. 2009 + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +* Neither the name of IBM nor the names of its contributors may be +used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +*/ + +#include +#include "local.h" + +/* On platforms where long double is as wide as double. */ +#ifdef _LDBL_EQ_DBL +long double +exp10l (long double x) +{ + return exp10(x); +} +#endif + -- 2.27.0