0.0.1 • Published 3 years ago

snow-varus v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Overview

Implement equation evaluate by stack with fraction support. Input equation by array of elements. Element can be number, fraction, operator and parentheses.

Purpose

Handle equation when already know all terms and operators.

Demo

❯ yarn dev

Start!!!
Compute: 1 + 2 * 3 = 3
Compute: 1 + 2 * 3 = 7
Compute: (1 + 2) * 3 = 9
Compute: 1 + (1/2) = 1.5
Compute: 1 + (1/3) = 1.3333333333333333
Compute: 1 + (1/3) + (1/2)= 1.8333333333333333
Finish!!!
Start Fraction!!!
Compute: 1 + 2 * 3 = 3/1
Compute: 1 + 2 * 3 = 7/1
Compute: (1 + 2) * 3 = 9/1
Compute: 1 + (1/2) = 3/2
Compute: 1 + (1/3) = 4/3
Compute: 1 + (1/3) + (1/2)= 11/6
Finish Fraction!!!