Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joelniemela/calculator
An advanced calculator app written in JavaScript
https://github.com/joelniemela/calculator
calculator calculator-app javascript programmable unicode vanilla-javascript webapp
Last synced: 5 days ago
JSON representation
An advanced calculator app written in JavaScript
- Host: GitHub
- URL: https://github.com/joelniemela/calculator
- Owner: JoelNiemela
- Created: 2022-07-16T04:20:31.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-09-08T05:16:02.000Z (about 2 years ago)
- Last Synced: 2023-03-06T00:58:16.587Z (over 1 year ago)
- Topics: calculator, calculator-app, javascript, programmable, unicode, vanilla-javascript, webapp
- Language: JavaScript
- Homepage: https://JoelNiemela.github.io/Calculator
- Size: 72.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Calculator
An advanced calculator app written in JavaScript
## Live Example
[JoelNiemela.github.io/Calculator](https://JoelNiemela.github.io/Calculator)## Features
### Variables
Supports assigning custom variables:
```ruby
x : 40
y : 2
x + y
42
```### Lambdas
Define and reuse your own custom lambda functions:
```ruby
fn : λx.x+2
fn(5)
7
```Or use lambda literals directly (IIFE):
```ruby
(λx.x+2)(3)
5
```### Unicode support
```ruby
√(π)
1.7724538509055743
```### Predefined mathematical constants
```ruby
e : 2.71828182846
π : 3.14159265359
```### Predefined functions
```ruby
sin
cos
tan
ln
log
sqrt
cbrt
```
#### Unicode aliases
```ruby
√ : sqrt
∛ : cbrt
```### Operators
```ruby
x + y
x - y
x × y
x ÷ y
x ^ y
```### Factorial function syntax
```ruby
x!
```