From: GT <tnggil@protonmail.com>
To: "libc-alpha@sourceware.org" <libc-alpha@sourceware.org>
Subject: PPC64 libmvec sin, cos, sincos
Date: Sun, 03 Mar 2019 17:21:16 +0000 [thread overview]
Message-ID: <7IBtSR-9y3hojcUhrE1RCxG5skB9fFCI7gQ6Q1w-rxfqHNc3Cxed6OuzcO0d6MREORdF_FK7g_k9uOtn1v0-_agUgbqhM0xRY3u1aaH67zg=@protonmail.com> (raw)
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) = 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 the
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 evaluations
for the three functions.
Any reason not to implement in this style?
Thanks.
Bert.
next reply other threads:[~2019-03-03 17:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-03 17:21 GT [this message]
2019-03-04 14:07 ` PPC64 libmvec sin, cos, sincos Szabolcs Nagy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='7IBtSR-9y3hojcUhrE1RCxG5skB9fFCI7gQ6Q1w-rxfqHNc3Cxed6OuzcO0d6MREORdF_FK7g_k9uOtn1v0-_agUgbqhM0xRY3u1aaH67zg=@protonmail.com' \
--to=tnggil@protonmail.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).