#calculator #cli

bin+lib rfcalc

A tool to calculate things

9 unstable releases (3 breaking)

0.4.0 Sep 11, 2024
0.3.3 Feb 24, 2024
0.2.1 Jun 22, 2023
0.1.1 Jun 17, 2023

#419 in Math

Download history 162/week @ 2024-09-05 194/week @ 2024-09-12 21/week @ 2024-09-19 16/week @ 2024-09-26 7/week @ 2024-10-03

367 downloads per month

MIT license

8KB
162 lines

CLI calculation tools

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

Installation

  1. Install Rust and Cargo will be installed, too
  2. Run cargo install rfcalc

Usage

E.g.

  • 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 fc <NUM>: Convert degree from Fahrenheit to Celsius

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
~86K SLoC