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

  Explaining class definition of subclass of square

Write down the class definition of subclass of Square called FancySquare which has a method called getDiagonal. The getDiagonal method gets no arguments.

  Program to enter up to 20 integers in the array of long

Write down a program which asks user in order to enter up to 20 integers in the array of longs.The program must utilize the function Find_It() in order to situate the integer within the array.

  Writing code in client program to enter score

Write down code in a client program to perform the following: prompt user to enter score and set score data member for player1.

  Program to find real solutions

Method, which determines whether value of "b squared" - 4ac is negative. If negative, code then  prints out message "no real solutions" and returns from method.

  Write functions

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

  Create nested menus interface for a check-in hotel

Create a nested menus interface for a check-in and check-out hotel reservation system that can be used internationally. Use numbers to select a menu item.

  Development of the current strategic potential of airline

Evaluate the organisation's current external and internal strategic position

  Definition of function quadratic receives double parameters

Write down definition of function named quadratic which receives 3 double parameters a , b , c . If value of a is 0 then function prints the message "no solution for a=0"

  Program to solve roots of quadratic equation

Write down a program which solves the roots of the quadratic equation of the given form:- ax 2 + bx + c = 0. Display the results on screen.

  Program to compute person-s body mass index

Write a program to compute person's body mass index? Create a modular program which calculates and display person's body mass index (BMI).

  Designing menu for administrator to simulate transmissions

Design a menu which permits administrator to simulate transmissions of information by manually typing in login or logoff data.

  Travelling salesman problem

Travelling Salesman Problem on the L1-metric plane.

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