About The Contest

The first ever Olympiad of Misguided Geeks contest at Worse Than Failure (or OMGWTF for short) is a new kind of programming contest. Readers are invited to be creative with devising a calculator with the craziest code they can write. One lucky and potentially insane winner will get either a brand new MacBook Pro or comparable Sony VAIO laptop.

Navigation

Advertisements

Entry #100237: The 4th Grader Calculator

by Andres I
This calculator works with arbitrarily large numbers. If it fits in your ram, you can add, sub, multiply or divide it (if you have the time).

Float numbers have a fixed size, and what's worse, you lose precision with big numbers. Obviously I can't use them. Instead, I use the algorithms I know since grade school (like long multiplication), that work great in paper. Porting them to C++ was a little harder than I thought.

It uses fixed point decimal numbers, and you can choose the precision.

Download0 Comments