rfcalc

Crates.iorfcalc
lib.rsrfcalc
version0.4.0
sourcesrc
created_at2023-06-17 08:33:43.658514
updated_at2024-09-11 14:39:19.399484
descriptionA tool to calculate things
homepagehttps://github.com/chengr4/calc-cli
repositoryhttps://github.com/chengr4/calc-cli
max_upload_size
id892772
size18,382
Eddie Cheng R4 (chengr4)

documentation

README

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>
Commit count: 18

cargo fmt