Tag Archives: fractions

BB #85: More Fraction Fun

I don’t know why I’m so fascinated that the rational numbers are countable even though they’re a dense subset of the uncountable real numbers. A rational number can be arbitrarily close to any real number, making you think they’d be infinite like the reals, but in fact, nearly all numbers are irrational (and an uncountable subset of the reals).

So, the rational numbers — good old p/q fractions — though still infinite are countably infinite (see this post for details).

More to the point here, a common way of enumerating the rational numbers, when graphed results in some pretty curves and illustrates some fun facts about the rational numbers.

Continue reading


Sideband #68: More Fraction Digits

The last Sideband discussed two algorithms for producing digit strings in any number base (or radix) for integer and fractional numeric values. There are some minor points I didn’t have room to explore in that post, hence this followup post. I’ll warn you now: I am going to get down in the mathematical weeds a bit.

If you had any interest in expressing numbers in different bases, or wondered how other bases do fractions, the first post covered that. This post discusses some details I want to document.

The big one concerns numeric precision and accuracy.

Continue reading


Sideband #67: Fraction Digits in Any Base

Fractional base basis.

I suspect very few people care about expressing fractional digits in any base other than good old base ten. Truthfully, it’s likely not that many people care about expressing factional digits in good old base ten. But if you’re in the tiny handful of those with an interest in such things — and don’t already know all about it — read on.

Recently I needed to figure out how to express binary fractions of decimal numbers. For example, 3.14159 in binary. And I needed the real thing — true binary fractions — not a fake that uses integers and a virtual decimal point.

The funny thing is: I think I’ve done this before.

Continue reading