Re: problem with output of the program on different OS
pereges <Broli00@gmail. comwrites:
This is not a good way to debug a program. Did you fix (or disprove)
the apparent bug that I pointed out? Using uninitialised data would
explain all the variation in results.
The probability of finding a compiler bug in language X is roughly
(epsilon + no. of years you've been programming in X)/N
(for some small epsilon and large N) :-)
--
Ben.
pereges <Broli00@gmail. comwrites:
Bart wrote:
>
I really don't know and now its not even the question of incorrect
output on different operating systems. Now, when I run the code on
linux, I get the same output everytime for the same set of input(this
was a problem previously).
>Been trying to investigate further, but's it's getting more complex
>and Pelles' IDE is a right pain to use.
>>
>The figures for radar->E_scattered start to divulge at ray_count=463
>(they are the same at ray_count=462).
>>
>The immediate culprit is r.pathlength, but this is traced to
>intersect_tria ngle(). I stored the last det value calculated in
>intersect_tria ngle, and the results were for ray_count=462, 463, 464:
>>
>0.550692 0.550692 0.329331 on main compilers
>0.550692 0.329331 0.329331 on Pelles C
>>
>Why is the middle one different? Might be a different pattern of
>calling intersect_trian gle(), which is where it starts to get
>complicated.
>>
>Perhaps you should forget Pelles C. You might do a lot of work just to
>discover some obscure bug in the compiler (on the other hand, you
>might well find some undefined behaviour in your program and maybe all
>the results were wrong).
>and Pelles' IDE is a right pain to use.
>>
>The figures for radar->E_scattered start to divulge at ray_count=463
>(they are the same at ray_count=462).
>>
>The immediate culprit is r.pathlength, but this is traced to
>intersect_tria ngle(). I stored the last det value calculated in
>intersect_tria ngle, and the results were for ray_count=462, 463, 464:
>>
>0.550692 0.550692 0.329331 on main compilers
>0.550692 0.329331 0.329331 on Pelles C
>>
>Why is the middle one different? Might be a different pattern of
>calling intersect_trian gle(), which is where it starts to get
>complicated.
>>
>Perhaps you should forget Pelles C. You might do a lot of work just to
>discover some obscure bug in the compiler (on the other hand, you
>might well find some undefined behaviour in your program and maybe all
>the results were wrong).
I really don't know and now its not even the question of incorrect
output on different operating systems. Now, when I run the code on
linux, I get the same output everytime for the same set of input(this
was a problem previously).
the apparent bug that I pointed out? Using uninitialised data would
explain all the variation in results.
The probability of finding a compiler bug in language X is roughly
(epsilon + no. of years you've been programming in X)/N
(for some small epsilon and large N) :-)
--
Ben.
Comment