• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Math Translation

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alright, I just received a homework assignment involving convergence loops. The problem is, I haven't taken any overly-advanced math classes yet, so I have absolutely no idea what this means:


*Note that variable a is a user-defined integer.

Could someone please translate that to a Java formula? I can't even really begin to attempt this homework without knowing what that means.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll try to explain in plain English what the math expression means.

You start with i = 0, and with a value x(0), and a constant value a.

Then you calculate the next value of x: x(1) (with i = 1). You do this with the given formula:

x(1) = (2 * x(0) * x(0) * x(0) + a) / (3 * x(0) * x(0))

Do you see how that matches with the math formula?

Then, when you have x(1), you can calculate x(2) using x(1), then x(3) using x(2) etc. as far as needed.
 
Rich Nelson
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Makes perfect sense. Thanks for your help.
 
In the renaissance, how big were the dinosaurs? Did you have tiny ads?
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic