3 ms·
That is really cool. Lambdas all the way down. The encoding of binary and ternary was interesting (following from the link at the bottom of the page). It does
by BoiledCabbage 3y ago
That is really cool. Lambdas all the way down.
The encoding of binary and ternary was interesting (following from the link at the bottom of the page). It does make me curious why ternary was chosen as the default.
- marvinborner 3y agoHi, thanks! Balanced ternary was chosen as the default base because an investigation by Torben Mogensen[1] showed that it's a good compromise in terms of space and time complexity. Higher bases can be even more compact and efficient, but require much larger implementations for arithmetic operations. Balanced ternary also supports negative numbers, which unary (Church) or binary (Mogensen) don't. [1]: https://doi.org/10.1007/3-540-45575-2_20 https://doi.org/10.1007/3-540-45575-2_20