Hello
Is there a way to get the real(kind=16) or a workaround for this in ftn95?
The following code works if real(kind=2) (i.e. double precision):
program feigenbaum
implicit none
integer i, j, k
real(kind=2) :: x, y, a, a1, a2, d1 ! kind=2 double precision
!real ( KIND = 16 ) x, y, a, b, a1, a2, d1
print '(a4,a13)', 'i', 'd'
a1 = 1.0;
a2 = 0.0;
d1 = 3.2;
do i=2,20
a = a1 + (a1 - a2) / d1;
do j=1,10
x = 0
y = 0
do k=1,2**i
y = 1 - 2 * y * x;
x = a - x**2;
end do
a = a - x / y;
end do
d1 = (a1 - a2) / (a - a1);
a2 = a1;
a1 = a;
print '(i4,f13.10)', i, d1
end do
end
I cannot reproduce the results below with real(kind=2):
i d 2 3.2185114220 3 4.3856775986 4 4.6009492765 5 4.6551304954 6 4.6661119478 7 4.6685485814 8 4.6690606606 9 4.6691715554 10 4.6691951560 11 4.6692002291 12 4.6692013133 13 4.6692015458 14 4.6692015955 15 4.6692016062 16 4.6692016085 17 4.6692016090 18 4.6692016091 19 4.6692016091 20 4.6692016091
Thanks Lester