From: David Mosberger <davidm@azstarnet.com>
Subject: Re: using linux instead of osf
Date: Tue, 26 Nov 1996 20:26:00 -0700 (MST) [thread overview]
Message-ID: <5b6b9122117b9d058ef9c8af65e4d36d.axp-list@archive.invalid> (raw)
> > > David Mosberger-Tang wrote:
> >
> > > [ Answering the following: ]
> >
> > > Naively, one would expect that, to compute the sine of some
> > > argument in single precision would require *less* fp operations than
> > > to get it correct up to double precision.
> >
> > You have a good point here.
> ....
> > The algorithm per se is the same. I don't
> > recall off-hand how many bits of precisions you get with each step in
> > a Taylor series, but it seems to me that you should be able to save
> > one or two steps when using single-precision.
> Ugh! I do hope that these routines do not use Taylor expansions
> to compute elementary functions. If yes, then no wonder that DEC
> library is so much faster. I do not have right now neither hardware
> nor sources, but in general Taylor expansions converge very slowly.
> There are better ways to compute such things.
Don't quote me on the "Taylor" part. Actually, upon closer inspection
there is a comment that simply says "polynomial of degree 13"---it
doesn't say how they arrived at that polynomial. Here are the
comments:
* Algorithm
* 1. Since sin(-x) = -sin(x), we need only to consider positive x.
* 2. if x < 2^-27 (hx<0x3e400000 0), return x with inexact if x!=0.
* 3. sin(x) is approximated by a polynomial of degree 13 on
* [0,pi/4]
* 3 13
* sin(x) ~ x + S1*x + ... + S6*x
* where
*
* |sin(x) 2 4 6 8 10 12 | -58
* |----- - (1+S1*x +S2*x +S3*x +S4*x +S5*x +S6*x )| <= 2
* | x |
*
* 4. sin(x+y) = sin(x) + sin'(x')*y
* ~ sin(x) + (1-x*x/2)*y
* For better accuracy, let
* 3 2 2 2 2
* r = x *(S2+x *(S3+x *(S4+x *(S5+x *S6))))
* then 3 2
* sin(x) = x + (S1*x + (x *(r-y/2)+y))
--david
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
next reply other threads:[~1996-11-27 3:26 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-11-27 3:26 David Mosberger [this message]
[not found] <Pine.LNX.3.91.961127232657.22225A-100000@lonsdale.lbl.gov>
1996-11-28 16:45 ` using linux instead of osf Michal Jaegermann
[not found] <199611270326.UAA03344@web.azstarnet.com>
1996-11-27 16:23 ` Michal Jaegermann
1996-11-28 6:25 ` Scott Locklin
[not found] <Pine.GSO.3.95.961127135505.6404C-100000@nks.oulu.fi>
1996-11-27 15:04 ` Jim Nance
-- strict thread matches above, loose matches on Subject: below --
1996-11-27 13:46 Toon Moene
[not found] <199611262251.PAA27353@web.azstarnet.com>
1996-11-27 2:58 ` Michal Jaegermann
1996-11-27 4:10 ` Scott Locklin
1996-11-26 22:51 David Mosberger
1996-11-26 22:18 Toon Moene
1996-11-26 21:35 Robert Williams
1996-11-26 20:10 David Mosberger
1996-11-27 9:10 ` Scott Manley
1996-11-26 17:26 David Mosberger
1996-11-26 19:12 ` Scott Manley
1996-11-26 14:36 Robert Williams
1996-11-26 16:45 ` Scott Manley
1996-11-26 12:58 Richard Gorton
1996-11-26 14:01 ` L.P.Williams
1996-11-26 14:09 ` Scott Manley
1996-11-26 14:24 ` L.P.Williams
1996-11-27 11:57 ` Topi Kanerva
1996-11-26 7:31 Maurice Hilarius
[not found] <199611260731.AAA12371@ellpspace.math.ualberta.ca>
1996-11-26 6:21 ` Scott Locklin
1996-11-26 16:06 ` Jon
1996-11-26 5:28 Robert Williams
1996-11-26 6:20 ` Jon
1996-11-26 4:05 Jon
[not found] <9611260136.AA04316@shaman.zk3.dec.com>
1996-11-26 3:06 ` Lev D Gelb
1996-11-26 3:20 ` velcro
[not found] <3299B059.398@bob.usuf2.usuhs.mil>
1996-11-26 1:36 ` Jon
[not found] <19961122190027.24615.qmail@brouhaha.com>
1996-11-25 20:49 ` Jim Paradis
1996-11-26 2:50 ` Jim Nance
1996-11-26 4:44 ` Jim Paradis
1996-11-25 18:54 Robert Williams
1996-11-25 14:42 Robert Williams
1996-11-22 19:00 Eric Smith
1996-11-19 23:22 rrussell
1996-11-19 23:21 rrussell
[not found] <Pine.SOL.3.91.961119112133.21276C-100000@cronos>
1996-11-19 12:29 ` Scott Manley
1996-11-22 1:42 ` Jim Paradis
1996-11-22 13:27 ` Scott Manley
1996-11-25 12:21 ` Scott Manley
1996-11-19 13:15 ` Jim Nance
1996-11-19 11:27 Wai Ming Tai
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox