Menu

math include file?

2003-02-17
2012-09-26
  • Nobody/Anonymous

    I tried using the pow statement to use the exponent in this formula

    payment = principal *(rate/(1-pow(rate+1,-term)));

    with -term being the exponent.  I was just wondering how to find out exactly what the math.h file covers?

     
    • Nobody/Anonymous

      Uhhh, open it up and look at it, in my case, the file is down in my c:\dev-cpp\include.  In my case also, Dev opens the header file for me to look at if I double click it...

      In it, you will find the following (Dev4.9.7.6,gcc-3.2)

      double    pow (double, double);

      Don't forget, you may have to link the math library in on compile, but thats easy, all you have to do is add:

      -lm

      to your compiler commands...

      Wayne

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.