Applications in involve computing various powers of e

Assignment Help Programming Languages
Reference no: EM1350430

The transcendental number, e. Many applications in mathematics involve computing various powers of e. It can be proven that
ex = 1 + x/1 + x2/2! + x3/3! + ...

for all values of x. Of course, this is an infinite sum, so we can't hope to actually sum all of these values up! But the good news is that the later terms get so small that a partial sum can provide a very nice approximation for the value of ex. You are to write a single precision function (result returned in $f0) called exp with one single 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 ex, using the following guide for terminating the summation:

If the next term divided by the summation so far is less that 1.0e-15, then terminate the summation (and don't even bother to add in that next term). [One might be tempted to just stop if the next term is less that 1.0e-15, but my proposed guide is more sensitive to the relative size of the actual summation.]

Even though the summation is valid for all values of x, there is a problem with convergence when you use negative values too small such as -20. Therefore, your exp function should compute the value of e|x| instead, and then invert the result (this process should be handled by the function exp, not by your driver program).

You can expect your program to have overflow problems when tested with values of x somewhere around 90 or -90 (Why?).

Reference no: EM1350430

Questions Cloud

High-low method of cost estimation : Describe how the high-low method of cost estimation can be used in estimating the fixed cost component of a mixed cost in a business.
Calculate current price of the bond : Fanta Cola has $1,000 par value bonds outstanding at 12% interest. The bonds mature in 25 years. Calculate the current price of the bond if the YTM is 16%?
Distinguish between cost and value : Distinguish between cost and value and explain their relative significance in accounting?
Illustrate what role did the policies of various governments : Illustrate what role did the policies of various governments play in the influencing the international expansion strategies of both McDonald's and Wal-Mart.
Applications in involve computing various powers of e : The transcendental number, e. Many applications in mathematics involve computing various powers of e. It can be proven that ex = 1 + x/1 + x2/2! + x3/3! + ... for all values of x. Of course, this is an infinite sum.
Illustrate what percentages would the price have to decrease : If Price elasticity of demand for restaurant meals is 2.27 and restaurant meals wants to increase slaes by 45% by illustrate what percentages would the price have to decrease to get the intended resualts.
Determine the dollar price of the bond : Suppose that the Financial Management company $1,000-par-value bond had a 5.700% coupon, matured on May 15, 2017, had a current price cost of 97.708.
Emergency department use for pediatric asthma : What would you recommend with respect to behavior and sociocultural factors associated with emergency department use for pediatric asthma?
Banking decision questions : Major Manufacturing currently has one bank account located in New York to handle all of its collections. The company keeps a compensating balance of $300,000 to pay for these services.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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