From 7a10eff75309da0f7abf9ae276d60de3ec21fe04 Mon Sep 17 00:00:00 2001 From: fschmnn <31562265+fschmnn@users.noreply.github.com> Date: Sat, 9 Mar 2019 13:00:59 +0100 Subject: [PATCH] 2019.03.09 - create readme --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..7997042 --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# duodecimal +Python converter/calculator for the duodecimal numeral system + +```python +from duodecimal import duo +``` +A duodecimal number can be initialized by passing a duodecimal number as a string or a decimal number as an int/float +```python +a = duo('1X.23') # initialize with duodecimal value +b = duo(3.14) # initialize with decimal value +``` +All basic math operations are supported. The first part must be an instance of the duo class. The second one can be another instance or any valid input for the duo class +```python +c = a + b +d = a - 2 +e = b * duo(1/2) +f = duo(20) / 'X' +``` +The decimal representation can be accessed via +```python +g = duo('X.31) +g.dec() +```