WTF!
I ran the same file like 20 times... all producing the same wrong answer. You could say I re-ran the case out of boredom or something--no good reason really.
BUT on roughly the 21st run, BAM I get the right answer. I hadn't edited my function AT ALL. I'd stared at it intensely to try and see why I was getting crappy results, but I definitely didn't change anything.
WTF. How does that even happen?!
It's not like the numbers were even close. The wrong answer I was getting consistently was about -15.stuff. The right answer is about 1.99stuff.
MORAL OF THE STORY: If your function doesn't do what you want, run it A BUNCH MORE TIMES and maybe the computer gods will change it for you.
GAH
-Eric
I ran the same file like 20 times... all producing the same wrong answer. You could say I re-ran the case out of boredom or something--no good reason really.
BUT on roughly the 21st run, BAM I get the right answer. I hadn't edited my function AT ALL. I'd stared at it intensely to try and see why I was getting crappy results, but I definitely didn't change anything.
WTF. How does that even happen?!
It's not like the numbers were even close. The wrong answer I was getting consistently was about -15.stuff. The right answer is about 1.99stuff.
MORAL OF THE STORY: If your function doesn't do what you want, run it A BUNCH MORE TIMES and maybe the computer gods will change it for you.
GAH
-Eric