8000 GitHub - spnda/calculator-bison: A simple calculator I wrote as a school project using Bison and Java
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

spnda/calculator-bison

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

calculator

A simple calculator I wrote as a school project using Bison and Java. The provided Makefile requires bison and javac to be in the PATH. To run the project, do this:

make
make run

The calculator now awaits input and will always output the result on a new line prefixed with >. The calculator generally makes use of BigDecimal to hold generic decimals, but has to convert to floating point numbers for calculating logiarithms or square roots. Some examples of how to use the calculator can be found below.

Basic arithmetic calculation:

5 * 5 + 5
> 30
sqrt(4)^2
4

Using functions:

cos(pi)
> -1
e^ln(100)
> 100

Assigning and using variables:

A = 500
> A = 500
A / 20
> 25

About

A simple calculator I wrote as a school project using Bison and Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
0