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

Entry #100138 - Ultra-Portable WTFCalc

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 #100138 - Ultra-Portable WTFCalc

    The purpose of this code is to provide a calculator function set for what I call "integer floating point". That is, to avoid the uncertainty and inaccuracy of floating point operations, it uses integer operations on the various parts of the floating point number to ensure high accuracy. There are some limits to this: some platforms don't have integer arithmetic functions available. Other platforms have very slow bit shifts, like the Pentium 4. To resolve this, I have made it so that the program only uses five operations: a) = assignments b) == comparison c) Bitwise NOT d) Bitwise
Page 1 of 1 (1 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems