close

Privacy guaranteed - Your email is not shared with anyone.

Chasing a code bug

Discussion in 'Tech Talk' started by devildog2067, Jul 12, 2007.

  1. devildog2067

    devildog2067

    16,321
    1,104
    Apr 20, 2005
    Chicago
    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.
     
  2. Blinky

    Blinky Rocket Surgeon

    1,916
    0
    Jul 14, 2005
    Beaver, OR
    I'll say! Any monkey with a computer could have found that!




    :tongueout:
     

  3. HerrGlock

    HerrGlock Scouts Out CLM

    23,792
    198
    Dec 28, 2000
    Sounds like the ol' semi-colon in the wrong place in a perl script :animlol:
     
  4. vote Republican

    vote Republican White and nerdy Moderator

    10,861
    1,663
    Aug 23, 2002
    OAF Mecca, MD
  5. 686Owner

    686Owner NRA Life Member

    12,455
    1,518
    Mar 10, 2007
    KY
    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.
     
  6. Its always something small like that and it always takes hours to find it.
     
  7. freepatriot

    freepatriot Retired GT Mod Moderator Moderator

    3,852
    24
    Aug 8, 2002
    South FL
    You are referring to my brain, right? :supergrin:
     
  8. freepatriot

    freepatriot Retired GT Mod Moderator Moderator

    3,852
    24
    Aug 8, 2002
    South FL

































    Geek.
     
  9. vote Republican

    vote Republican White and nerdy Moderator

    10,861
    1,663
    Aug 23, 2002
    OAF Mecca, MD

    :hugs:

    ;f ;f ;f ;f
     
  10. freepatriot

    freepatriot Retired GT Mod Moderator Moderator

    3,852
    24
    Aug 8, 2002
    South FL

    :rofl: :rofl: :rofl: :rofl:

    <--- almost had forgotten about ;f;f;f