The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

Entry #100086 - Bizinary

Last post 06-11-2007 12:09 PM by Alex Papadimoulis. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 06-11-2007 12:09 PM

    Entry #100086 - Bizinary

    I saw a bunch of suggestions involving ridiculously overcomplicated solutions, but they all looked like they would take me more than an hour to code up, so they were quickly discarded. I took the route of doing everything in binary arithmetic, and through a curious quirk, only division supports floating-point answers (for example: "1/2" produces "0.5" as instructed, but if you turn around and try to multiply that by "1", you get "0"). Actually, it's not really that curious a quirk. I got lazy in the middle and just started casting everything to integers after seeing that none of the test
Page 1 of 1 (1 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems