Re: same function giving different results
From: Bart Vandewoestyne (MyFirstName.MyLastName_at_telenet.be)
Date: 01/06/05
- Previous message: Bart Vandewoestyne: "same function giving different results"
- In reply to: Bart Vandewoestyne: "same function giving different results"
- Next in thread: beliavsky_at_aol.com: "Re: same function giving different results"
- Reply: beliavsky_at_aol.com: "Re: same function giving different results"
- Reply: Jan Vorbrüggen: "Re: same function giving different results"
- Reply: Michel OLAGNON: "Re: same function giving different results"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 6 Jan 2005 14:35:05 +0000 (UTC)
In article <1105021545.735158@seven.kulnet.kuleuven.ac.be>, Bart Vandewoestyne wrote:
>
> I have been looking over and over this again, and my guess would be that the problem is somewhere with the allocatable array I'm using inside my function, but
> i cannot find the real problem and how to fix it.
>
> Can anybody tell me what I'm doing wrong?
I've found out that the subroutine get_digits returns different results
each time:
subroutine get_digits(n, b, mydigits)
integer, intent(in) :: n, b
integer, intent(inout) :: mydigits(:)
integer :: i = 1
integer :: temp
temp = n
do while (temp /= 0)
mydigits(i) = mod(temp,b)
temp = floor(real(temp/b))
i = i+1
end do
end subroutine get_digits
Still, i cannot locate the exact problem...
Regards,
Bart
-- "Share what you know. Learn what you don't."
- Previous message: Bart Vandewoestyne: "same function giving different results"
- In reply to: Bart Vandewoestyne: "same function giving different results"
- Next in thread: beliavsky_at_aol.com: "Re: same function giving different results"
- Reply: beliavsky_at_aol.com: "Re: same function giving different results"
- Reply: Jan Vorbrüggen: "Re: same function giving different results"
- Reply: Michel OLAGNON: "Re: same function giving different results"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]