Thread: Exponent help

  1. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    22

    Exponent help

    How would I write this formula in code?

    A = 1.13(8.7 - 0.1345 x 69)

    the part in the parentheses is actually an exponent to 1.13

    Thanks,
    John

  2. #2
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490
    If you can't figure that out, none of us can help you. The '*' symbol means multiplication, the '-' symbol is subtraction, and there is no symbol for exponentiation. You have to use a function.

    double A = pow(1.13,(8.7 - 0.1345 * 69));

  3. #3
    Registered User
    Join Date
    Jun 2003
    Posts
    22
    I knew how to ready the *and - I just didnt know how to make the exponent part.

    I need mathc function with that also correct?

    Thanks

  4. #4
    Registered User
    Join Date
    Nov 2002
    Posts
    1,109
    Yes, you need cmath.

  5. #5
    Registered User
    Join Date
    Oct 2002
    Posts
    291

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. mantissa, sign, exponent
    By -EquinoX- in forum C Programming
    Replies: 28
    Last Post: 03-05-2008, 02:25 PM
  2. Shift exponent and comma to match (normalize)
    By luise.valencia in forum C++ Programming
    Replies: 6
    Last Post: 04-14-2005, 11:49 AM
  3. exponent math, calculus?
    By phosphorousgobu in forum C++ Programming
    Replies: 11
    Last Post: 10-20-2004, 10:55 AM
  4. exponent and power problems, please help
    By andreasb in forum C++ Programming
    Replies: 3
    Last Post: 11-11-2003, 08:33 AM
  5. Illegal exponent operator, how do i fix this?
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 09-21-2001, 09:13 PM