joelniemela / calculator Goto Github PK
View Code? Open in Web Editor NEWAn advanced calculator app written in JavaScript
Home Page: https://JoelNiemela.github.io/Calculator
An advanced calculator app written in JavaScript
Home Page: https://JoelNiemela.github.io/Calculator
unit
.°
(degree). Add support to the parser for numbers such as 23°
and 32.43°
°
has the unit degree
Create the type Exp
.
All expressions and nodes in the AST should be of type Exp
.
Implement the function stringifyExp
that should turn an expression into the string that would be parsed as that expression.
Lambda functions should be added with the following syntax:
fn : λx.x + 2
.fn : λx y.x + y
fn(4)
(λx.x + 2)(2)
Add the function log2 to the calculator interface, using the label log₂
Currently, the Rad
/Deg
toggle doesn't affect the behavior of the trigonometry functions.
Rad
is set, trigonometry functions should treat their input as radians.Deg
is set, trigonometry functions should treat their input as degrees.Create the class Value.
Any runtime value should be of type Value
.
There's no way to type the log₂
function.
This should be fixed by adding subscripts.
The variable module should contain a way to inspect variables' values and modify them. Buttons related to variables, such as :
, currently in the function module, should be moved to the variable module.
Things to look out for:
Calling a lambda should create a function scope, where arguments and any temporary variables are stored.
The calculator's layout should be modular and organized in 4x5 segments (modules), which can be combined in different ways. Stacking modules and toggling between them with a button should also be possible to save screen space.
Potential modules:
λ
), and other function-related buttons.:
for assigning variables.There should be an Auto
mode which would allow the use of radians and degrees in the same equation.
Add the button °
(degree). Add support to the parser for numbers such as 23°
and 32.43°
When Auto
is enabled:
°
should be treated as degrees.°
should be treated as radians.Organize all calculator state and logic into a class that creates all necessary DOM elements and sets up event handlers when instantiated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.