# 64-bit Floating Point Representations

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?

© BrainMass Inc. brainmass.com October 10, 2019, 8:10 am ad1c9bdddfhttps://brainmass.com/computer-science/numerical-analysis/64-bit-floating-point-representations-611877

#### 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?