From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 55A5920248 for ; Sun, 3 Mar 2019 17:21:32 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:to:from:reply-to:subject:message-id :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=rmAaRHwxVqpakqQDKxPUTSdcuSfFfxlAGGAqwlfW5QsBzWdsrJ+xb Aq1RSihbUTgPPc0iBJLE4L1rxzArREqb2tqom0HrYIvWVxtlMamF8kmmNIsmmY0A JownEg20CfLwxD0T//3aLOJ+DmI8mENCUhkm/7/mBpWtNLrPeuY06A= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:to:from:reply-to:subject:message-id :mime-version:content-type:content-transfer-encoding; s=default; bh=JEn7XGZUhxpcUG/y9uNpNct0WkY=; b=I1zmkgopm187JXv+xM+KivrTH7Rj HkFbGM1pA/ciwgodEyTDIPfEMkwuaxqfYLIpUTFbMhmn9L/zo6PPRmlTY0SLl27H PMQsUGGIK7mBxu6+BHuMKGG4nKznJFjmcfWAN3GrqWGCPfQy+LjAcbO+oB7jgo69 n2QQbu0P0JiA1kY= Received: (qmail 93439 invoked by alias); 3 Mar 2019 17:21:29 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 93430 invoked by uid 89); 3 Mar 2019 17:21:29 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-40135.protonmail.ch Date: Sun, 03 Mar 2019 17:21:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=default; t=1551633684; bh=3+szUNPaaCAPjdGgykR13gL5lqwf3DcRmpTcXiOHtvQ=; h=Date:To:From:Reply-To:Subject:Feedback-ID:From; b=ASrikXnKiv9QisWRTQxoCJ+LDWf1yUw/dwJ+JQxxIYqxcRBH7TiawC+XQaxMR1dsb nYkJzFK1k3hc0i+uChZMSz2fnqXP3v7tkSjg7jGPSIAyvnGIIv3VMxjwODyJwArxtu m0h+4cMlytjBfX4dzt395KCJBaKvyNnDmG8ikQgI= To: "libc-alpha@sourceware.org" From: GT Reply-To: GT Subject: PPC64 libmvec sin, cos, sincos Message-ID: <7IBtSR-9y3hojcUhrE1RCxG5skB9fFCI7gQ6Q1w-rxfqHNc3Cxed6OuzcO0d6MREORdF_FK7g_k9uOtn1v0-_agUgbqhM0xRY3u1aaH67zg=@protonmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Here is a suggestion to organize the implementation of the three functions a little differently than was done for x86_64. Because of the trigonometric identity cos (x) =3D sin( x + PI/2), selecting either the sine or cosine polynomial series approximation should suffice to compute all three functions. Defining the series in a static inline function will let us call it with input argument x or x +/- PI/2 for sine and cosine (depending on which of t= he two series was chosen). For sincos, the function will be called twice: once to obtain the cosines of the inputs and a second time to get the sines. Doing that will allow us to maintain a single file which performs evaluatio= ns for the three functions. Any reason not to implement in this style? Thanks. Bert.