#math #calculator #cli

bin+lib rfcalc

A tool to calculate things

8 releases

0.3.3 Feb 24, 2024
0.3.2 Feb 24, 2024
0.2.1 Jun 22, 2023
0.1.1 Jun 17, 2023

#49 in #calculator

41 downloads per month

MIT license

7KB
154 lines

CLI calculation tools

rfcalc stands for "R4 Calculations". R4 is my self representaion =_=

Installation

  1. Intall Rust
  2. Run cargo install rfcalc

Usage

  • rfcalc factorial <NUM>: Calculate the factorial of a number (max: 20)
  • rfcalc hw <NUM>: Calculate the Hamming weight of a binary number
  • rfcalc c <N> <K>: Calculate the combination of N choose K

rfcalc bytes <expression to calculate>

Quickly devide bytes

only support units of lower case now

E.g.

rfcalc bytes "4mb/4kb"
1024 kb

Testing

cargo run -- <subcommand> <args>

Dependencies

~3.5–5MB
~88K SLoC