Displaying 1 result from an estimated 1 matches for "calculating_a".
Did you mean:
calculating
2010 Aug 30
4
LOOping problem with R
...---
numeric(0)
[1] 0.08
[1] 0.0048
[1] 0.000432
numeric(0)
[1] 0.0048
[1] 0.06
[1] 0.0054
numeric(0)
[1] 0.000432
[1] 0.0054
[1] 0.09
numeric(0)
[1] 0
[1] 0
[1] 0
*********************************************************************************
IN FORTRAN, the results is totally different.
program calculating_a
implicit none
integer i, j, k
double precision a, theta(4)
theta(1)=0.06; theta(2)=0.08; theta(3)=0.09; theta(4)=0
do i=1, 4
do j=1, 4
a=1
do k=i,j-1
a=a*theta(k)
end do
print*, a
end do
end do
end
Here goes the results with FOTRAN
---------------------------------------------------------------...