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 #100104: Bitwise is fastest calculator

by Peter Cawley
Company policy is to avoid slow operators (eg + - / = * < >) and use only fast operators (>>= <<= ^=). As such, valid operators are: ( ) >>= <<= ^= , [ ] -> .
And invalid operators: all others, including: + - = / * & | && || -- ++ == != < > <= >= %

Not only is the main calculator logic done totally with just the valid operators, so is everything else.

Download0 Comments