GlockTalk.com
Home Forums Classifieds Blogs Today's Posts Search Social Groups



  
SIGN-UP
Notices

Glock Talk
Welcome To The Glock Talk Forums.
Reply
 
Thread Tools Display Modes
Old 07-12-2007, 07:29   #1
devildog2067
Senior Member
 
devildog2067's Avatar
 
Join Date: Apr 2005
Location: Near Chicago, IL
Posts: 15,780
Chasing a code bug

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.
devildog2067 is offline   Reply With Quote
Old 07-12-2007, 07:30   #2
Blinky
Rocket Surgeon
 
Blinky's Avatar
 
Join Date: Jul 2005
Location: Beaver, OR
Posts: 6,856
Send a message via AIM to Blinky Send a message via MSN to Blinky Send a message via Yahoo to Blinky
I'll say! Any monkey with a computer could have found that!




__________________
Quote:
Originally Posted by tat2guy View Post
"The first amendment says that congress shall pass no law abridging the freedom of speech. I'm not congress and I'm not passing a law. I'm the guy telling you to shut the **** up and move along."
Blinky is offline   Reply With Quote
Old 07-12-2007, 08:06   #3
HerrGlock
CLM Number 2
Scouts Out
 
HerrGlock's Avatar
 
Join Date: Dec 2000
Posts: 64,431


Re: Chasing a code bug

Quote:
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
__________________
Sent from my rotary phone
"The way I see it as soon as a baby is born, he should be issued a banjo!"- Linus Van Pelt
UNIX - Not just for Vestal Virgins any more
HerrGlock is offline   Reply With Quote
Old 07-12-2007, 09:56   #4
vote Republican
White and nerdy
 
vote Republican's Avatar
 
Join Date: Aug 2002
Location: OAF Mecca, MD
Posts: 60,163


unless ws_fc is 1
__________________
Power corrupts. Absolute power is really, really, cool.
vote Republican is offline   Reply With Quote
Old 07-12-2007, 10:02   #5
686Owner
NRA Life Member
 
686Owner's Avatar
 
Join Date: Mar 2007
Location: KY
Posts: 8,491
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.
686Owner is offline   Reply With Quote
Old 07-12-2007, 10:06   #6
captainstormy
Senior Member
 
captainstormy's Avatar
 
Join Date: Jul 2007
Location: Columbus, Ohio
Posts: 3,965
Send a message via ICQ to captainstormy Send a message via AIM to captainstormy Send a message via Yahoo to captainstormy
Its always something small like that and it always takes hours to find it.
__________________
I won't be wronged. I won't be insulted. I won't be laid a-hand on. I don't do these things to other people, and I require the same from them. - John Bernard Books(John Wayne in The Shootist)
captainstormy is offline   Reply With Quote
Old 07-12-2007, 13:35   #7
freepatriot
Retired GT Mod
 
freepatriot's Avatar
 
Join Date: Aug 2002
Location: South FL
Posts: 35,354


Quote:
Originally posted by captainstormy
Its always something small like that.
You are referring to my brain, right?
__________________
Still breathing
scottauldmusic.com
freepatriot is offline   Reply With Quote
Old 07-12-2007, 13:35   #8
freepatriot
Retired GT Mod
 
freepatriot's Avatar
 
Join Date: Aug 2002
Location: South FL
Posts: 35,354


Quote:
Originally posted by vote Republican
unless ws_fc is 1

































Geek.
__________________
Still breathing
scottauldmusic.com
freepatriot is offline   Reply With Quote
Old 07-12-2007, 13:42   #9
vote Republican
White and nerdy
 
vote Republican's Avatar
 
Join Date: Aug 2002
Location: OAF Mecca, MD
Posts: 60,163


Quote:
Originally posted by freepatriot
Geek.



;f ;f ;f ;f
__________________
Power corrupts. Absolute power is really, really, cool.
vote Republican is offline   Reply With Quote
Old 07-12-2007, 13:44   #10
freepatriot
Retired GT Mod
 
freepatriot's Avatar
 
Join Date: Aug 2002
Location: South FL
Posts: 35,354


Quote:
Originally posted by vote Republican


;f ;f ;f ;f



<--- almost had forgotten about ;f;f;f
__________________
Still breathing
scottauldmusic.com
freepatriot is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump




All times are GMT -6. The time now is 02:05.



Homepage
FAQ
Forums
Calendar
Advertise
Gallery
GT Wiki
GT Blogs
Social Groups
Classifieds


Users Currently Online: 733
166 Members
567 Guests

Most users ever online: 2,244
Nov 11, 2013 at 11:42