JustAidanP / Bidmas

A bidmas calculator in swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bidmas

A bidmas calculator in swift

Usage

First cd into the directory

cd PATH/TO/YOUR/DIRECTORY

then run the command

./bidmas "YOUR CALCULATION"

Example

For example, the command:

./bidmas "7 + (4*s(0.5*3.13159))/2"

Returns:

8.999975

Operations

The supported operations include:

  • +:
NUM_1 + NUM_2
  • -
NUM_1 - NUM_2
  • *
NUM_1 * NUM_2
  • /
NUM_1 / NUM_2
  • ^ - For Power operations
BASE ^ (POWER)

Triganometric functions:

  • Sin:
s(YOUR CALCULATION)
  • Cos:
c(YOUR CALCULATION)
  • Tan:
t(YOUR CALCULATION)

About

A bidmas calculator in swift

License:GNU General Public License v3.0


Languages

Language:Swift 100.0%