Many of my articles address common topics; I’ve grouped them here for your convenience.
Properties of the Powers of Two
Binary numbers are made of powers of two; these articles discuss their properties:
- How to Find the Last Digits of a Positive Power of Two
- Patterns in the Last Digits of the Positive Powers of Two
- Cycle Length of Powers of Two Mod Powers of Ten
- Seeing Powers of Five in Powers of Two and Vice Versa
- Patterns in the Last Digits of the Positive Powers of Five
- Cycle Length of Powers of Five Mod Powers of Ten
- Ending Digits of Powers of Five Form a Binary Tree
Properties of Binary Numbers
These articles discuss properties of binary numerals:
Binary Arithmetic
These articles discuss binary arithmetic:
Bicimals
These articles discuss bicimals, the binary equivalent of decimals:
- Bicimals
- Converting a Bicimal to a Fraction (Subtraction Method)
- Converting a Bicimal to a Fraction (Direct Method)
- Converting a Bicimal to a Fraction (Series Method)
- “0.1 Repeating” In Binary Equals 1
- Number of Decimal Digits In a Binary Fraction
Binary Palindromes
These articles discuss binary palindromes (numbers like 1001001):
- Finding Numbers That Are Palindromic In Multiple Bases
- Counting Binary and Hexadecimal Palindromes
- The Structure of Binary/Hexadecimal Palindromes
- Counting Binary/Hexadecimal Palindromes
- In Search of Decimal/Binary/Hexadecimal Palindromes
Visualizing Binary Numbers
These articles discuss ways to visualize binary numbers:
Correctly Rounded Decimal to Floating-Point Conversion
These articles discuss conversion of decimal strings to floating-point binary numbers:
- Quick and Dirty Decimal to Floating-Point Conversion
- Decimal to Floating-Point Needs Arbitrary Precision
- Incorrectly Rounded Conversions in Visual C++
- Incorrectly Rounded Conversions in GCC and GLIBC
- Correctly Rounded Conversions in GCC and GLIBC
- GCC Conversions Are Incorrect, Architecture or Otherwise
- real.c Rounding Is Perfect (GCC Now Converts Correctly)
- GLIBC strtod() Incorrectly Converts 2^-1075
- Visual C++ and GLIBC strtod() Ignore Rounding Mode
- Correct Decimal To Floating-Point Using Big Integers
- How strtod() Works (and Sometimes Doesn’t)
- How GLIBC’s strtod() Works
- How GCC Converts Decimal Literals to Floating-Point
- Fast Path Decimal to Floating-Point Conversion
- strtod()’s Initial Decimal to Floating-Point Approximation
- Using Integers to Check a Floating-Point Approximation
- Adjusting the Floating-Point Approximation in strtod()
- Bigcomp: Deciding Truncated, Near Halfway Conversions
- Properties of the Correction Loop in David Gay’s strtod()
- Incorrect Directed Conversions in David Gay’s strtod()
- A Bug in the Bigcomp Function of David Gay’s strtod()
- Gay’s strtod() Returns Zero For Inputs Just Above 2^-1075
- A Better Way to Convert Integers in David Gay’s strtod()
- Double Rounding Errors in Floating-Point Conversions
- GCC Avoids Double Rounding Errors With Round-To-Odd
- Incorrect Decimal to Floating-Point Conversion In SQLite
- PHP Hangs On Numeric Value 2.2250738585072011e-308
- Why “Volatile” Fixes the 2.2250738585072011e-308 Bug
- A Better Fix for the PHP 2.2250738585072011e-308 Bug
- Java Hangs When Converting 2.2250738585072012e-308
- A Closer Look at the Java 2.2250738585072012e-308 Bug
- PHP Converts 2.2250738585072012e-308 Incorrectly
- Incorrectly Rounded Subnormal Conversions in Java
- Nondeterministic Floating-Point Conversions in Java
- Visual C++ strtod(): Still Broken
- 17 Digits Gets You There, Once You’ve Found Your Way
- Double Rounding Errors in Decimal to Double to Float Conversions
- Direct Generation of Double Rounding Error Conversions in Kotlin
- Numbers Greater Than DBL_MAX Should Convert To DBL_MAX When Rounding Toward Zero
Correctly Rounded Floating-Point to Decimal Conversion
These articles discuss conversion of floating-point binary numbers to decimal strings:
- Quick and Dirty Floating-Point to Decimal Conversion
- Incorrect Floating-Point to Decimal Conversions
- Inconsistent Rounding of Printed Floating-Point Numbers
- Fifteen Digits Don’t Round-Trip Through SQLite Reals
- 15-Digit Quick and Dirty Conversions Don’t Round-Trip
- The Shortest Decimal String That Round-Trips: Examples
- Incorrect Round-Trip Conversions in Visual C++
- The Shortest Decimal String That Round-Trips May Not Be The Nearest
- Java Doesn’t Print The Shortest Strings That Round-Trip
- Anomalies In IntelliJ Kotlin Floating-Point Literal Inspection
Correctly Rounded Hexadecimal to Floating-Point Conversion
These articles discuss conversion of hexadecimal strings to floating-point binary numbers:
- Incorrect Hexadecimal to Floating-Point Conversions in Visual C++
- Incorrect Hexadecimal to Floating-Point Conversions in David Gay’s strtod()
Printing the Contents of a Floating-Point Variable
These articles show different ways to display the exact contents of an IEEE 754 floating-point variable:
- Nine Ways to Display a Floating-Point Number
- Displaying the Raw Fields of a Floating-Point Number
- Hexadecimal Floating-Point Constants
- Displaying IEEE Doubles in Binary Scientific Notation
- Converting Floating-Point Numbers to Binary Strings in C
- Nine Ways to Display a Floating-Point Number
The Theory Behind Round-Trip Floating-Point Conversions
These articles discuss the mathematics that govern round-trip floating-point conversions:
- The Spacing of Decimal Floating-Point Numbers
- The Spacing of Binary Floating-Point Numbers
- 7 Bits Are Not Enough for 2-Digit Accuracy
- Number of Digits Required For Round-Trip Conversions
- The Inequality That Governs Round-Trip Conversions: A Partial Proof
- Decimal Precision of Binary Floating-Point Numbers
Length Of Numbers In Decimal Vs. Binary
These articles discuss the length of numbers when expressed in decimal vs. binary: