robinhundt / my-calculator

Trying to write a calculator because i don't know how to use bc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

My Calculator

A small calculator for simple calculations. I mainly did this because I can never remember how to use decimal numbers with bc...
Also I wanted to try some handwritten lexing and parsing. The parser is an Operator-precedence parser and the evaluation is done with arbitrary precision decimals, so 0.1 + 0.2 == 0.3.

Installing

Clone the repo and issue cargo install --path ..

Usage

Either mc "5 + 8 * 2" or just mc for interactive mode.

About

Trying to write a calculator because i don't know how to use bc.


Languages

Language:Rust 100.0%