Need some help with exp()

This is a discussion on Need some help with exp() within the C++ Programming forums, part of the General Programming Boards category; Hey, Could anyone please explain how to use the <cmath> function exp()? I could really use the help. Thanks, Tarls....

  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,493
    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, 02:44 PM
  2. Working with Parser Generators - Functions
    By jason_m in forum C Programming
    Replies: 1
    Last Post: 09-09-2008, 10:38 PM
  3. how do you use exp()
    By panfilero in forum C Programming
    Replies: 1
    Last Post: 09-23-2005, 04:41 PM
  4. Output problems with structures
    By Gkitty in forum C Programming
    Replies: 1
    Last Post: 12-16-2002, 05:27 AM
  5. Exponential function exp()
    By robquigley@hotmail.com in forum C Programming
    Replies: 2
    Last Post: 01-05-2002, 09:11 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21