6 lines
No EOL
334 B
Markdown
6 lines
No EOL
334 B
Markdown
# NegBin
|
|
|
|
Implements a class handling numbers in base -2.
|
|
|
|
Currently only the `+` operation is specific, all other operations (`-`, `~`, `*` with a scalar) are based on this one.
|
|
The implementation is quite naive and a bit slow but it works (~30x slower than integer addition on my machine). It can also convert to and from decimal ! |