From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,2cb1c7dcdf4349e1 X-Google-Attributes: gid111c93,public From: Bruce Allen Subject: Re: sin() on alpha. Date: 1998/05/22 Message-ID: <3565295F.7367C07E@dirac.phys.uwm.edu>#1/1 X-Deja-AN: 355481079 Content-Transfer-Encoding: 7bit References: Content-Type: text/plain; charset=us-ascii Organization: University of Wisconsin - Milwaukee, Physics Department Mime-Version: 1.0 Newsgroups: comp.os.linux.alpha > With a good co-processor of alpha, how much does it take to calcuate > sin() in comparison with simple + or * operations ? Should I suppress > the use of sin() to reduce computation as much as possible ? Should I > use Taylor expanded polynomials ? NO! Use min/max (Chebyshev) polynomials to evaulate sin(x). See Numerical Recipes in C, section 5.8 or to save time use Abramowitz and Stegun 4.3.96-103 for all standard trig functions. If you don't need to do range reduction of x to [0,pi/2] this will be significantly faster than most libraries. Bruce Allen