Re: Value of "e" in the C log() function
- From: cri@xxxxxxxx (Richard Harter)
- Date: Thu, 05 Mar 2009 15:59:55 GMT
On Thu, 05 Mar 2009 08:47:02 +0000, Richard Heathfield
<rjh@xxxxxxxxxxxxxxx> wrote:
Keith Thompson said:
Richard Heathfield <rjh@xxxxxxxxxxxxxxx> writes:
CBFalconer said:
"almurph@xxxxxxxxxxxxx" wrote:
Does anyone know what is the exact value of "e" that the C
language uses in the log() function. I ask as I am coparing the
respective function (C vs C#) to see if there are any
differences.
e is a transcendental. It has no exact rational value.
Any approximation of e used by a C implementation, however,
/does/ have an exact rational value, and this is the value he was
asking about. A better answer would be that the value used, if
any, depends on the implementation.
An even better answer (already given) is that the computation of
log() typically doesn't depend on any approximation of e.
Which is why I said "if any". I would imagine most implementors use
the Taylor series (BICBW).
You might well imagine that, and I suppose you would be right if
we count people reinventing the wheel as implementors. For most
functions, log in particular, the Taylor series is a terrible
choice. A major reason why is that the error residual curve is
not level.
Richard Harter, cri@xxxxxxxx
http://home.tiac.net/~cri, http://www.varinoma.com
Save the Earth now!!
It's the only planet with chocolate.
.
- Follow-Ups:
- Re: Value of "e" in the C log() function
- From: *** T. Winter
- Re: Value of "e" in the C log() function
- References:
- Re: Value of "e" in the C log() function
- From: CBFalconer
- Re: Value of "e" in the C log() function
- From: Richard Heathfield
- Re: Value of "e" in the C log() function
- From: Keith Thompson
- Re: Value of "e" in the C log() function
- From: Richard Heathfield
- Re: Value of "e" in the C log() function
- Prev by Date: Re: Consideration on pointer declarations
- Next by Date: Re: Help with this little line of code please...
- Previous by thread: Re: Value of "e" in the C log() function
- Next by thread: Re: Value of "e" in the C log() function
- Index(es):
Loading