View Full Version : Chasing a code bug
devildog2067
07-12-2007, 07:29
I just spent three hours chasing a code bug which turned out to be me being stupid.
Oddly enough,
gain[eta-1][phi-1][depth-1] += (w[layer-1] * e0 * ws_fc[eta-1][phi-1][layer-1][depth-1]);
doesn't give the right answers if you're supposed to DIVIDE by ws_fc.
I'm an idiot.
That is all.
I'll say! Any monkey with a computer could have found that!
:tongueout:
HerrGlock
07-12-2007, 08:06
Originally posted by devildog2067
I just spent three hours chasing a code bug which turned out to be me being stupid.
Oddly enough,
gain[eta-1][phi-1][depth-1] += (w[layer-1] * e0 * ws_fc[eta-1][phi-1][layer-1][depth-1]);
doesn't give the right answers if you're supposed to DIVIDE by ws_fc.
I'm an idiot.
That is all.
Sounds like the ol' semi-colon in the wrong place in a perl script :animlol:
vote Republican
07-12-2007, 09:56
unless ws_fc is 1 :supergrin:
686Owner
07-12-2007, 10:02
I've done similar things. I got real good at debugging by printing out all the variables to the console and/or letting the compiler step thru it line by line.
captainstormy
07-12-2007, 10:06
Its always something small like that and it always takes hours to find it.
freepatriot
07-12-2007, 13:35
Originally posted by captainstormy
Its always something small like that.
You are referring to my brain, right? :supergrin:
freepatriot
07-12-2007, 13:35
Originally posted by vote Republican
unless ws_fc is 1 :supergrin:
Geek.
vote Republican
07-12-2007, 13:42
Originally posted by freepatriot
Geek.
:hugs:
;f ;f ;f ;f
freepatriot
07-12-2007, 13:44
Originally posted by vote Republican
:hugs:
;f ;f ;f ;f
:rofl: :rofl: :rofl: :rofl:
<--- almost had forgotten about ;f;f;f
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.