╭─────────────────────────╮
│ ╷ • │
│ │ │
│ ╭─┤ ╭─╴ • ╶┤ ┌─┬─╮ │
│ │ │ │ │ │ │ │ │
│ ╰─┘ ╰─╴ • ╶┴╴ ╵ ╵ │
╰─────────────────────────╯
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
(Assuming complete and up-to-date build environment)
cargo install dcim
gmp-mpfr-sys
requires some extra setup. Follow the instructions here, under "Building on Windows". 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.
export RUSTFLAGS=" -C link-arg=$(clang -print-libgcc-file-name)"
dcim -h
to learn more.!
.W
). The parameter K
only applies to output.State::default()
).
.custom_*
methods.IOTriple
).
stdio!()
creates a set that uses standard input, output and error. exec
.rust
use dcim::*;
let mut state = State::default() //create state storage
.custom_w(1_000_000_000); //precision to 1 billion bits
let mut io = stdio!(); //will print to console
exec(&mut state, &mut io, true, "[pi]\"p").unwrap(); //calculate π, print