Write a double precision function

Assignment Help Basic Computer Science
Reference no: EM13307253

Write a double precision function (result returned in $f0) with one double precision parameter (in $f12), along with a little driver program for testing your function. Your function should use the summation formula as an approximation for the value of sin(x). If the absolute value of the next term is less than 1.0e-15, then terminate the summation. Even though the summation is valid for all values of x, there is a problem with convergence when you use values of x having absolute values greater than 30 or so. You may assume that we will test your program with values within this range.

(sample execution)

Enter a (radian) value for x (or 999 to exit): 0

Our approximation for sin(0) is 0

Enter a (radian) value for x (or 999 to exit): 1

Our approximation for sin(1) is 0.8414709848078965

Enter a (radian) value for x (or 999 to exit): -10

Our approximation for sin(-10) is 0.54402111088906224

Enter a (radian) value for x (or 999 to exit): 1.570796326794896   [?/2]

Our approximation for sin(1.5707963267948959) is 1

Enter a (radian) value for x (or 999 to exit): -.5232

Our approximation for sin(-0.5232) is -0.49965461045512305

Enter a (radian) value for x (or 999 to exit): -.5235987755982988 [-?/6]

Our approximation for sin(-0.52359877559829882) is -0.5

Enter a (radian) value for x (or 999 to exit): 999

Exit

 

Reference no: EM13307253

Questions Cloud

Competencies between nurses prepared : Write a formal paper discussing the differences in competencies between nurses prepared at the associate-degree level versus the baccalaureate-degree level in nursing.
Compute the fraction of time mary spends using her telephone : Assuming a single-server limited-capacity Bernoulli queuing process with 1-minute frames, compute the fraction of time Mary spends using her telephone.
Long cylindrical glass tube : A 10.0cm long cylindrical glass tube, sealed at one end, is filled with ethanol. The mass of ethanol needed to fill the tube is found to be 11.48g . The density of ethanol is 0.789 g/mL.
Find the gauge pressure of the water guns reservoir : A hand-pumped water gun is held level at a height of 0.84 m above the ground and fired. Find the gauge pressure of the water gun's reservoir
Write a double precision function : Write a double precision function (result returned in $f0) with one double precision parameter (in $f12), along with a little driver program for testing your function.
What is the total delay per cycle and delay per vehicle : A left-turn movement has a maximum arrival rate of 200 veh/h. The saturation flow of this movement is 1400 veh/h. For this approach, the yellow time is 4 seconds, all red time is 2 seconds and total lost time is 3 seconds.
Permanent label may be placed ob a radiograph : State three ways a permanent label may be placed ob a radiograph. For each state the procedure for doing so and a disadvantage for each method? Explain how you would determine the amount of time a film should stay in the developer solution of the man..
Especially responsive to magnetic fields : The cobalt(II) ion, Co^(2+), is especially responsive to magnetic fields, more so that Co^(1+) and Co^(3+). Why
What is the resulting ciphertext : Consider WEP for 802.11. Suppose that the data is 10101010 and the keystream is 11110111. What is the resulting ciphertext?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd