|
|
Entry #100043: Buggy 4-Function Calculatorby Stephen Oberholtzer
READ THE README.TXT FILE BEFORE RUNNING THE PROGRAM!
What makes this special? Well, for one thing, it leaks memory, which is pretty impressive for something that shouldn't need to *allocate* any memory. For each operator, the first input is converted four times: from string, to float, back to string, to float. The second input is only converted from string to float. Then each input is converted to a horrible fixed-point format. Computations are performed on this new format, then converted back to float, then converted back to a string for display. Lots of little WTFs were thrown in, with things like IsNegative, memory leaks, and subtle comments. Also, I'm pretty sure the math is a bit off for certain inputs. I'm sure I had other things to say, but I completely forgot what it was between my original submission and my resubmission. Download • 0 Comments |