64-bit Floating Point Representations
Not what you're looking for?
We have the differential equation
We simulate it with 64-bits floating point. For a large value of n the calculated solution will be:
My attempt was to first solve it by hand:
The two roots: r_1=1/2 r_2=1/3
y_n=C(1/2)^n+D(1/3)^n
y_0=C+D=1 y_1=C 1/2+D 1/3=1/2 (1-D)1/2+D 1/3=1/2
1/2-1/2 D+D 1/3=1/2
-3/6 D+D 2/6=0 D=0 C=1
y_n=(1/2)^n
I don't see where the floating point inequarcy would lead to a wrong anwer for large n. Can you show where it does that?
Question 2:
A second order inhomoegeneous differential equation has the solution
If one are given two start values one would obtain that it is:
If the equation is simulated on a pc with 64-bits floating point one would get for large n that the computed result would be
From the assignment we see that C=0 and D=1 and A as a guessed solution is 1. How can you show that this would create overflow?
Purchase this Solution
Solution Summary
Why does (1/2)^n appear as 0 for large values of n?
What is causing the overflow in this other expression for large values of n?
Purchase this Solution
Free BrainMass Quizzes
Excel Introductory Quiz
This quiz tests your knowledge of basics of MS-Excel.
Basic Networking Questions
This quiz consists of some basic networking questions.
Java loops
This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.
Word 2010: Tables
Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.
Inserting and deleting in a linked list
This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.