https://github.com/1computer1/calculator
https://github.com/1computer1/calculator
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/1computer1/calculator
- Owner: 1Computer1
- Created: 2018-03-24T05:10:36.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-24T05:10:58.000Z (almost 8 years ago)
- Last Synced: 2025-02-17T21:14:09.024Z (11 months ago)
- Language: Java
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
# Calculator
A command line calculator (work-in-progress).
Features include:
- Variables
- Functions
- Matrices
# Syntax
Operators include `a + b`, `a - b`, `a * b`, `a / b`, `a ^ b`, `-a`, and `a!`.
Call functions with parentheses, such as `sqrt(2)` or `root(3, 27)`.
Create a matrix with `[1, 2; 3, 4]` where `,` indicates the next column and `;` indicates the next row.
Find the determinant with `det(m)` (only works with 2x2 for now).
Declare variables using `let name = expression`.
Declare functions using `let name(a, b, c) = expression`.
See grammar.bnf for exact details.
Run commands using `:command`, for example, `:help` or `:quit`.