|
-
Jul 3rd, 2008, 09:48 AM
#1
Thread Starter
Member
Same program same data different result
Hi, I don't know if this is the right place for this post. No doubt it will be moved if it isn't....
I recently wrote a program which involved a lot of number crunching (thousands of operations) - but NO random numbers...
On an machine running XP I get one answer - on a machine running Vista I get a slightly different answer.
Anyone any ideas? Is there a difference between Vista and XP in the way they deal with numbers?
Thanks.
-
Jul 3rd, 2008, 11:09 AM
#2
Re: Same program same data different result
You could start by showing some of your code? We can't guess what kind of operations you are talking about, can we?
-
Jul 3rd, 2008, 12:06 PM
#3
Re: Same program same data different result
Do you use Doubles and .... is the Vista 64 bits?
Would explain a lot.
 why can't programmers keep and 31 Oct and 25 dec apart. Why Rating is Useful
for every question you ask provide an answer on another thread.
-
Jul 3rd, 2008, 03:00 PM
#4
Thread Starter
Member
Re: Same program same data different result
There isn't anything fancy in the operations - just the four rules of number. There is far to much code to start quoting it... It is a big program....
The Vista laptop is 32 bit. I don't use doubles in the part of the program that causes the small differences.
I just wondered if there was anything obvious in the way Vista worked that could account for it...
-
Jul 3rd, 2008, 06:53 PM
#5
Fanatic Member
Re: Same program same data different result
Perhaps a stupid question, but if you ran it 10 times on the same machine, do you get the exact same answer every time?
-
Jul 5th, 2008, 01:33 AM
#6
Re: Same program same data different result
Without a doubt, the difference is caused by the way the two operating systems handle numbers. How, exactly, though i'm not sure.
-
Jul 5th, 2008, 02:13 AM
#7
Re: Same program same data different result
Still thinking it's about doubles or singles
probably some inexplicit conversion to a double like
Dim A as Long
A = tolng(34 + (71/3) *( 5/6))
Or
Dim A as Variant
A = 9872442/957
 why can't programmers keep and 31 Oct and 25 dec apart. Why Rating is Useful
for every question you ask provide an answer on another thread.
-
Jul 18th, 2008, 07:24 PM
#8
Re: Same program same data different result
 Originally Posted by King Arthur
There isn't anything fancy in the operations - just the four rules of number. There is far to much code to start quoting it... It is a big program....
The Vista laptop is 32 bit. I don't use doubles in the part of the program that causes the small differences.
I just wondered if there was anything obvious in the way Vista worked that could account for it...
Vista has nothing to do with it. The computer hardware that uses the operating system might have something to do with it.
-
Jul 19th, 2008, 12:53 AM
#9
Thread Starter
Member
Re: Same program same data different result
Thanks a lot Code Doc. I wouldn't want to blame Vista if the problem might lie elsewhere.... anyway - it is something I can 'live with'.
Regards
King Arthur
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|