Staredit Network > Forums > Technology & Computers > Topic: Programming problem
Programming problem
Feb 27 2008, 3:12 am
By: MillenniumArmy  

Feb 27 2008, 3:12 am MillenniumArmy Post #1



Determine the number of terms necessary to approximate cos x to 8 significant figures using the Maclaurin series approximation

cosx=1-x^2/2!+x^4/4!-x^6/6!+x^8/8!....

Calculate the approximation using a value of x=0.3pi. For each iteration, calculate the approximation of cosx, the true percent relative error and the approximate percent relative error. Write the results to an output file (this last part I can do so don't worry about it.)


*note
True percent relative error = (True Value – Calculated Value)/True Value
Approximate percent relative error = (Current Value – Previous Value)/(Current Value)
To calculate a value correct to ‘n’ significant digits, we were told to use something like: ABS(True Relative Error)<=0.5*10^-n

As unfortunate as it is, our class uses Fortran. So if you guys could, could you give me your answer either in Fortran, pseudocode, or if all else fails, C++.

Any help appreciated ASAP.



None.

Feb 27 2008, 3:53 am Test Post #2



Your current code would be nice.



None.

Feb 27 2008, 6:13 am MillenniumArmy Post #3



nvm I got it.



None.

Feb 27 2008, 6:15 am DT_Battlekruser Post #4



Mathematicians just use the Lagrange Error Bound. :P



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:53 am]
Ultraviolet -- :lol:
[06:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[06:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[06:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
Please log in to shout.


Members Online: zsnakezz, jun3hong