Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

README

        

Calculator

An advanced calculator app written in JavaScript



Calculator

## 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!
```