[D66] Duodecimal python library [new]
René Oudeweg
roudeweg at gmail.com
Sat Jan 3 02:56:42 CET 2026
[Deze implementatie bestond nog niet...]
https://github.com/juggao/duodecimal/tree/main
I've created a native base-12 arithmetic library that stores and
computes numbers entirely in duodecimal representation! Here are the key
features:
Core Capabilities:
* Native Base-12 Storage: Numbers stored as lists of digits [0-11],
using 'X' for 10 and 'E' for 11
* All Four Basic Operations: Addition, subtraction, multiplication, and
division implemented in pure base-12
* Configurable Precision: Context-based precision control (like Python's
decimal module)
* Multiple Input Formats: Can create from base-12 strings, decimals, or
other Duodecimal objects
Key Advantages Demonstrated:
1/3 is exact: Duodecimal("1") / Duodecimal("3") gives exactly 0.4 in base-12
1/4 is exact: Perfect representation (unlike some bases)
1/6 terminates: Another advantage of 12's factorization
The Tradeoff:
1/5 becomes infinite in base-12, just like 1/3 is infinite in decimal
This demonstrates that no base eliminates rounding—it only shifts which
fractions terminate.
More information about the D66
mailing list