Thread: Need some help with exp()

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    12

    Question Need some help with exp()

    Hey,

    Could anyone please explain how to use the <cmath> function exp()? I could really use the help.

    Thanks,
    Tarls.

  2. #2
    I'm Back
    Join Date
    Dec 2001
    Posts
    556
    exp is used whenever you have to calculate something like : e^x
    its different from pow().

    syntax=

    float res;
    res=exp(5); //e^5
    -

  3. #3
    Registered User
    Join Date
    Mar 2002
    Posts
    12
    Is 'e' always the same? I'm trying to do:

    amount = principle * e^(rate * time)

    where rate is an annual interest rate, time is in years, and e is 2.71823.

    Thanks for the help,
    Tarls.

  4. #4
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490
    e is a constant, just like pi.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. floating point number comparison
    By stanlvw in forum C++ Programming
    Replies: 9
    Last Post: 04-27-2009, 01:44 PM
  2. Working with Parser Generators - Functions
    By jason_m in forum C Programming
    Replies: 1
    Last Post: 09-09-2008, 09:38 PM
  3. how do you use exp()
    By panfilero in forum C Programming
    Replies: 1
    Last Post: 09-23-2005, 03:41 PM
  4. Output problems with structures
    By Gkitty in forum C Programming
    Replies: 1
    Last Post: 12-16-2002, 05:27 AM
  5. Replies: 2
    Last Post: 01-05-2002, 09:11 AM