Exponent help

This is a discussion on Exponent help within the C++ Programming forums, part of the General Programming Boards category; How would I write this formula in code? A = 1.13(8.7 - 0.1345 x 69) the part in the parentheses ...

  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,493
    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, 01: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, 07: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

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