LmCast :: Stay tuned in

More Floating Point Alternatives

Recorded: Sept. 22, 2026, 2:51 a.m.

Original Summarized

floating point alternatives

Skip to Content

Navigation:

★
wizard zines
★

programming zines by Julia Evans

home
store
comics
my library






Here's a preview from my zine, How Integers and Floats Work!

If you want to see more comics like this, sign up for my saturday comics newsletter or browse more comics!

get the
zine!

read the transcript!
more floating point alternatives
there are many alternative ways to represent numbers
These are all implemented in software (not hardware) so they’re a lot slower, and different languages have different libraries.
alternative 1: decimal floating point
This is like regular floating point, but in base 10 instead of base 2. It’s also standardized in IEEE 754.
Examples: Python’s decimal module or Java’s BigDecimal
alternative 2: fractions
This lets you do exact calculations with fractions (1/10 + 2/10 = 3/10)
Examples: Python’s fractions module in the standard library, Lisps have first-class support
alternative 3: symbolic computation
For example, sqrt(2) instead of 1.414.
You’ll see this in computer algebra systems like Mathematica, Maple, or sympy.
alternative 4: interval arithmetic
The idea is to store every number as a range so that you can precisely track your error bars.
Probably the least mainstream of these alternatives.
alternative 5: binary-coded decimal
This is how floating point numbers (and integers) were stored on IBM computers in the 60s, and you can still occasionally see it today in old formats like ISO 8583 for financial transactions.

Wizard Zines

FAQ
Newsletter
Julia's blog
Free zines
Experiments
Comics
Posters

Store

Print directions
Zine errors
Educators
Shipping
policy
Privacy
policy
Accessibility

Newsletter

new
zine announcements
new
comics as they're posted
a
comic from the archives every saturday

subscribe!

There exist numerous methods for representing numbers beyond the standard floating-point system, though these alternatives are typically implemented in software rather than in hardware, which results in reduced performance. Different programming languages also feature varying libraries that support these approaches.

One alternative is decimal floating point, which operates in base 10 instead of the traditional base 2, while maintaining standardization through the IEEE 754 framework. Examples of this approach include the Python decimal module and Java’s BigDecimal class. Another method is fractions, which facilitates exact arithmetic by representing numbers as irreducible fractions, thereby enabling operations like 1/10 plus 2/10 to result precisely in 3/10. This concept is supported in standard libraries, such as Python’s fractions module, and in languages like Lisps, which offer first-class support for such representations.

Symbolic computation offers a third method, focusing on representing mathematical entities rather than inexact numerical approximations; for instance, instead of storing an approximation like 1.414 for the square root of two, this method stores the exact symbolic expression, such as sqrt(2). This paradigm is utilized within computer algebra systems such as Mathematica, Maple, and sympy.

Interval arithmetic represents numbers as ranges rather than single points, allowing for the precise tracking of error bars associated with calculations. Although this approach allows for high-fidelity error control, it is noted as being less mainstream among these alternatives. Finally, binary-coded decimal is a historical method of representation, being the manner in which floating-point and integer numbers were stored on older IBM computers during the 1960s, and this format can still be observed in certain legacy formats like ISO 8583 for financial transactions.