Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2010
    Posts
    2
    Rep Power
    0

    Default Need help with math equation

    I need help with a math equation in Java - how do you write a power? I have googled it and seem to have found all incorrect information.

    MonthlyPayment =
    [MortgageAmount * (1 + MonthlyInterestRate)TotalMonth * MonthlyInterestRate] /[(1 + MonthlyInterestRate)TotalMonth 1]

    where TotalMonth is an exponent.

    Also, if you have any good java resources, please let me know.

    Thanks,
    Anna

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,371
    Blog Entries
    7
    Rep Power
    20

    Default

    Math.pow(x, y) raises x to the power y, e.g. Math.pow(2, 5) == 32. Google for Sun's tutorial and Sun's API documentation, you'll need them; b.t.w. you can even download them and read them off-line.

    kind regards,

    Jos

  3. #3
    Join Date
    Jan 2010
    Posts
    2
    Rep Power
    0

    Default

    Thank you for your help. This worked. Also, thank you for your suggestion to read the sun documents, which I will do.

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,371
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by annabellastorm View Post
    Thank you for your help. This worked. Also, thank you for your suggestion to read the sun documents, which I will do.
    You're welcome of course and good to see you want to read the docs; reading is more of an exception than it is a rule nowadays ;-)

    kind regards,

    Jos

  5. #5
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. differential equation RK4
    By arvindmer in forum New To Java
    Replies: 3
    Last Post: 01-08-2009, 01:27 PM
  2. Quadratic Equation
    By jpnym15 in forum New To Java
    Replies: 4
    Last Post: 11-12-2008, 03:29 AM
  3. Help with an equation in java
    By coco in forum New To Java
    Replies: 1
    Last Post: 07-31-2007, 07:47 AM
  4. Help with quadratic equation in java
    By paul in forum New To Java
    Replies: 1
    Last Post: 07-25-2007, 08:23 PM
  5. Problem with equation in my algorithm
    By romina in forum New To Java
    Replies: 2
    Last Post: 07-20-2007, 07:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •