CalcBits

CalcBits Icon

Learn how doubles work

CalcBits is an iOS app that I wrote to help me learn how doubles ("double-precision floating-point numbers") work. It's a calculator that helps you learn how doubles work as you use them.

Enter and manipulate numbers like you would with any calculator. As you go, CalcBits shows you how each number is stored in memory, as 64 binary bits. And because each calculation is done using double-precision floating-point arithmetic, you can see how the same calculation would work (including rounding) in your own code.

Features

  • Perform double-precision floating-point calculations, seeing the result and its binary and hexadecimal representations in memory.
  • See how the 64 bits are divided up into 1 sign bit (shown in yellow), 11 exponent bits (shown in magenta), and 52 fraction bits (shown in cyan).
  • Divide by zero or take the square root of a negative number to see how NaN (not a number) and inf (infinity) are represented.
  • Press the shift (up arrow) button to reveal the functions you would expect on a scientific calculator, such as trigonometric and hyperbolic trigonometric functions, and built-in constants for π and e.
  • Use the copy button to copy the current value or its binary or hexadecimal representation. Paste numbers copied from inside the app or from another program.
  • You can even paste binary or hexadecimal double-precision representations copied from another app, as long as they begin with 0x (hex) or 0b (binary).
  • Rotate into landscape mode for a larger, read-only view of a number's binary and hexadecimal representations.

Download

CalcBits for macOS is now available free of charge under the MIT License.

Download version 0.5. (sha256 checksum: 8e4bf3a7b4ab9f713c113806c6054dfc879e8388f7240f3bbef74c4533868fb0)

A note to purchasers of the iOS version of CalcBits

To users who purchased the iOS version of CalcBits, thank you very much for your support. I'm sorry that I'm no longer able to provide the app through the Apple App Store.

As a solo, hobbyist developer, I haven't been able to figure out how to ensure my app complies with new age verification laws, such as the Texas App Store Accountability Act. Apple has released some new APIs meant to assist with this. Even so, I remain unsure what I would have to do to comply with such laws, and I'm concerned about the legal risk these laws introduce. As a result, I've reluctantly chosen to pull the iOS app from Apple's App Store.

While I know that not every iPhone user has a Mac, I've created the macOS version of CalcBits, so that at least some of my former customers can continue to use the app. I regret that I lack the expertise and time to port the app to other platforms where I could distribute the app independently.

If you have questions or concerns about this change, please contact help@geoffrey-lovelace.com.

Support

If you have questions or encounter any issues using CalcBits, or questions about CalcBits' privacy policy (the App Store requires you to have a privacy policy, even though CalcBits doesn't collect any personal information at all), please contact me at help@geoffrey-lovelace.com.

CalcBits Screenshot