╭─────────────────────────╮ │ ╷ • │ │ │ │ │ ╭─┤ ╭─╴ • ╶┤ ┌─┬─╮ │ │ │ │ │ │ │ │ │ │ │ ╰─┘ ╰─╴ • ╶┴╴ ╵ ╵ │ ╰─────────────────────────╯

dc improved - Expanded rewrite of a classic RPN calculator / esoteric programming language

This readme only mentions changes compared to GNU dc. If you're unfamiliar with its core principles, read its man page or the Wikipedia article.

Complete documentation in the wiki

Building

(Assuming complete and up-to-date Rust environment)

In general

shell cargo install dcim

Windows

gmp-mpfr-sys requires some extra setup, follow the instructions here. After building it in MinGW once, new dc:im versions can be built normally until I update it to a new version of gmp-mpfr-sys.

Note: Numbers with huge mantissae (W≥2³⁰) cause crashes for some arcane internal reason I can't control. If you want to calculate something to a billion digits, use WSL.

Android (Termux)

This seems to be required for Rust in general: shell export RUSTFLAGS=" -C link-arg=$(clang -print-libgcc-file-name)" Install: shell MAKEFLAGS="-i" cargo install dcim The current version of GNU MPFR fails one inconsequential test (no idea why), use -i to pretend it doesn't happen.

Most important changes compared to GNU dc

Using dc:im in your code