From: already5chosen@yahoo.com
Subject: Re: Trigonometric operations on x86 and x64 CPUs
Date: Mon, 19 Dec 2016 15:49:36 -0800 (PST)
Date: 2016-12-19T15:49:36-08:00 [thread overview]
Message-ID: <18af86db-21fd-4fa0-90a3-c87b6486b439@googlegroups.com> (raw)
In-Reply-To: <o39pet$gfc$1@franka.jacob-sparre.dk>
On Tuesday, December 20, 2016 at 1:11:26 AM UTC+2, Randy Brukardt wrote:
> <already5chosen@yahoo.com> wrote in message
> news:a6734b29-5ffc-4938-bbc2-453f7ae92325@googlegroups.com...
> ...
> >> Creating a package which does the range reduction right, and passes
> >> small values through to the hardware instructions is not all that hard.
> >
> >Such implementations are common, due the hype created by sensationalists.
>
> Yeah, like the people at Intel who document how to use these instructions.
> :-)
> They recommend (at least in the documents I have seen) to do argument
> reduction before using the instructions.
>
I don't know what documents you had seen.
In "Intel 64 and IA-32 Architectures Software Developer’s Manual" Intel recommend to use argument reduction when the argument is out of supported range [-2**63..+2**63].
Of course trigs with double precision argument outside of range [-2**54..+2**54] are no more than equivalents of bad PRNG, so Intel's advice does not have a lot of practical significance.
IMHO, for x outside of [-2**63..+2**63] it would be o.k. for sin(x) and cos(x) to return any value in range [-1..1]. They are all equally meaningless.
> There's also the little matter of meeting the Ada language requirements. The
> people who put accuracy requirements on Ada numeric libraries might have
> been "sensationalists"", but those of us implementing Ada have to abide by
> those requirements.
Unfortunately, I don't know where to look for Ada language requirement.
Can you tell me what are requirements for sin/cos in Ada numeric library?
> (Argubly, one of the advantages of Ada is that there are
> requirements, so you have some asssurance out of the box that the numerics
> will work predicably, no matter what target you use.)
>
> Randy.
Yes, before IEEE-754 that was a significant advantage*.
Today - less so.
----------
* - I wonder what happened in real world on machines with bad arithmetic, like CRAY-1? Did not it lead to situation where significant parts of Ada numeric library were so slow that users concerned with speed were rolling their own alternatives.
next prev parent reply other threads:[~2016-12-19 23:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-16 0:38 Trigonometric operations on x86 and x64 CPUs Robert Eachus
2016-12-16 14:00 ` Luke A. Guest
2016-12-16 20:16 ` Randy Brukardt
2016-12-16 23:20 ` Robert Eachus
2016-12-18 10:09 ` already5chosen
2016-12-18 14:19 ` Robert Eachus
2016-12-18 15:45 ` hreba
2016-12-18 15:47 ` already5chosen
2016-12-19 23:11 ` Randy Brukardt
2016-12-19 23:49 ` already5chosen [this message]
2016-12-20 5:27 ` Niklas Holsti
2016-12-20 8:37 ` Simon Wright
2016-12-20 9:12 ` G.B.
2016-12-20 18:01 ` already5chosen
2016-12-21 1:20 ` Randy Brukardt
2016-12-21 9:29 ` already5chosen
2016-12-16 20:50 ` Vadim Godunko
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox