#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

#342 in Math

Download history 38/week @ 2024-07-29 335/week @ 2024-09-09 29/week @ 2024-09-16 20/week @ 2024-09-23 16/week @ 2024-09-30

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–5MB
~85K SLoC