Thread: Exponential function exp()

  1. #1

    Exponential function exp()

    Does anyone know how i can find out exactly how this function is
    implemented in C, ie. the code behind exp().

    Any help would be much appreciated,

    Thanx,

    Rob.

  2. #2
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    Assuming you want to implement this function by yourself, I would direct you to this site:

    http://www.ualr.edu/~lasmoller/efacts.html

    Here it is explained how one can approximate the value of e using series. One of the approximations:

    e = 1+ 1/2 + 1/(2 x 3) + 1/(2 x 3 x 4) + 1/(2 x 3 x 4 x 5) + . . .

  3. #3
    Registered User
    Join Date
    Jan 2002
    Posts
    49
    #include <math.h>
    Function: double exp (double x)


    Example :


    #include <stdio.h>
    #include <math.h>

    int main(void)
    {
    double y;
    double x=2.37;
    y = exp(x);
    printf("%f\n",y);
    getc(stdin);
    return 0;
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. In over my head
    By Shelnutt2 in forum C Programming
    Replies: 1
    Last Post: 07-08-2008, 06:54 PM
  2. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 11:45 AM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  4. Message class ** Need help befor 12am tonight**
    By TransformedBG in forum C++ Programming
    Replies: 1
    Last Post: 11-29-2006, 11:03 PM
  5. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 02:53 AM