Re: R: LOG(x) BASIC function

1999-03-22 Thread shevek
On Fri, 19 Mar 1999, Stefano Fronteddu wrote: Taylors rule says that log (1+x) = x - x^2/2 + x^3/3 + + (x^(2n+1)) / (2n+1)! so log x = (x-1) - (x-1)^2/2 + ... +(-1)^n-1 * ((x-1)^n) / n This is correct, but remember that this is an approximation near x=0 (in the original form),

R: R: LOG(x) BASIC function

1999-03-22 Thread Stefano Fronteddu
Right, good observation ;-) Thanks, Stefano -Messaggio originale- Da: shevek [EMAIL PROTECTED] A: [EMAIL PROTECTED] [EMAIL PROTECTED] Data: lunedì 22 marzo 1999 14.32 Oggetto: Re: R: LOG(x) BASIC function On Fri, 19 Mar 1999, Stefano Fronteddu wrote: Taylors rule says that log

R: LOG(x) BASIC function

1999-03-19 Thread Stefano Fronteddu
very much like a log. You could use the taylor-series, which can be calculated quite quick, but is not a very good approximation. I don't know the taylor-series by heart, but I could look it up. In case you want to start programming, it will be of the form: y=a+bx+cx^2+dx^3+ Taylors rule

Re: LOG(x) BASIC function

1999-03-19 Thread Maarten ter Huurne
At 05:22 PM 3/18/99 +0100, you wrote: I was wondering how BASIC calculates LOG(x). Does it use a look-up table (would require massive amounts of memory), some sort of algorithm (would require massive amounts of CPU time), or some mixed method? There must be using a way that requires only a

RE: LOG(x) BASIC function

1999-03-19 Thread Hans Otten
change... Hans -Original Message- From: Maarten ter Huurne [mailto:[EMAIL PROTECTED]] Sent: vrijdag, maart 19, 1999 01:00 uur To: [EMAIL PROTECTED] Subject: Re: LOG(x) BASIC function At 05:22 PM 3/18/99 +0100, you wrote: I was wondering how BASIC calculates LOG(x). Does it use a look-up

LOG(x) BASIC function

1999-03-18 Thread Patriek Lesparre
Hi all, I was wondering how BASIC calculates LOG(x). Does it use a look-up table (would require massive amounts of memory), some sort of algorithm (would require massive amounts of CPU time), or some mixed method? I'm trying to speed up multiplication and division (in machinecode) by using the

Re: LOG(x) BASIC function

1999-03-18 Thread shevek
On Thu, 18 Mar 1999, Patriek Lesparre wrote: Hi all, I was wondering how BASIC calculates LOG(x). Does it use a look-up table (would require massive amounts of memory), some sort of algorithm (would require massive amounts of CPU time), or some mixed method? I'm trying to speed up