Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 15 Apr 2012 08:30:05 -0500 Message-ID: <4F8ACD5D.4D89@mindspring.com> Date: Sun, 15 Apr 2012 09:30:05 -0400 From: pete Reply-To: pfiland@mindspring.com Organization: PF X-Mailer: Mozilla 3.04Gold (WinNT; I) MIME-Version: 1.0 Newsgroups: sci.math.num-analysis,alt.lang.asm,comp.programming Subject: Re: Exp() function reloaded References: <4F8A5BF2.17C5@mindspring.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 27 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 4.154.221.67 X-Trace: sv3-UmvEv0E+ffPVdmiID20BE2HnhnloJraz6OUQWdb1zORxypDGbj8HegkZTi/hNfFqD/MGg+E0SFMJ0up!gkPhNOM2dVSK+mIHOVM62pq86RiMiABtSIEd6UfrfNz2gu8n20+t8LN3m0iEGESXwTV9Ec+7hVJ6!epp27fA4fg== X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1779 X-Received-Bytes: 2010 Xref: csiph.com comp.programming:1473 hopcode wrote: > > Il 15.04.2012 07:26, pete ha scritto: > > > > I've code Taylors's exp(x) for both positive and negative x in C, > > using -1.0< x< +1.0, > > but without making use of e^-x being essentially 1 / e^x. > > > > ... > > for (square = 0; x> 1; x /= 2) { > > while (-1> x) { > > x /= 2; > > do { > > b /= n++; > > b /= n++; > > ... > > that is a waster divisional toy, pete. > replace it with something better. ;-) The point that I was trying make, is that if you can do Taylor's for (-1.0 < x), then it may not be necessary to consider e^-x being essentially 1 / e^x. -- pete