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

  Program to use next character to create and return operator

Convert the string of digits into an integer. Otherwise, use the next character to create and return an operator.

  Program to enter answer to a math problem

Write a program which ask student to enter an answer to a math problem. The user must enter two values, one at time, and then ask for answer.

  Unix systems administration

Unix Systems Administration

  Explaining handles clause of sub procedure

You are asked to design a form with a textbox named txtQty, a label named lblStatus, and a button named btnGetStatus. What will be Handles clause at the end of sub procedure?

  Program to multiply two integers

What occurs when you multiply two integers whose product is larger than largest int value? Try out example and report your findings.

  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 compute person earns in a month

Write a program that calculates how much a person earns in a month if the salary is one penny the first day, two pennies the second day, four pennies the third day.

  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.

  Computing average net profit per sale of product

Your company bought 250,000 online advertising impressions and made average net profit per sale of product of $5.

  Learn redirecting standard output

Learn redirecting standard output (stdout) to a file using the output redirection operator

  Html/css

"Validating Your Work" Please respond to the following:  Describe attribute minimization. Explain what would happen if you tried to validate a page containing instances of attribute minimization. Propose a solution to this problem.

  Program to create professor rating class

Write down program to create Professor Rating class comprising of professor ID and three ratings. Three ratings are utilized to estimate easiness.

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