Calculator: Difference between revisions

From Adam Colton
Jump to navigation Jump to search
No edit summary
Line 16: Line 16:
== Namespaces ==
== Namespaces ==
Breaks up working areas. Namespaces should be lazy loaded.
Breaks up working areas. Namespaces should be lazy loaded.
== Graphing ==
To consider
* setting the range
* setting the height (or auto-setting)
Other graphs
* Parametric
* Polar
* Statistical
** bar
** box
For performance, it may be worth generating the graph in passes, producing a usable graph quickly, but increasing the precision over a few seconds.


== Types ==
== Types ==
Line 28: Line 42:
* Matrices
* Matrices
* Complex
* Complex
It would also be good to have "unit" type. This would be "family", "type" and "factor". So kg would have a factor of "k" a type of "g" which is in the family "mass".


== Core ==
== Core ==
Line 42: Line 58:
* graph: graphs a function
* graph: graphs a function
* clear: clears the log
* clear: clears the log
== Modules ==
Written in JavaScript (duh). They are imported as namespaces.


== Need to Support ==
== Need to Support ==
Line 51: Line 70:
** volume (namespace)
** volume (namespace)
* Find roots: given a function, find the roots
* Find roots: given a function, find the roots
* Statistics


== Appearance ==
== Appearance ==

Revision as of 18:22, 2 November 2015

I've never found an online calculator I like. I've never really found a decent replacement for my TI graphing calculator. In a terminal, I generally use something like Python.

I'd like to make an online math terminal. The user can enter basic expressions and see their evaluation. Users can define functions and evaluate them at points, or open them as a graph in a new window.

I'd like to include a whole host of common equations divided into namespaces.

Users can also have their own namespaces. By default, these will be kept in local storage. I'll add someway to do manual syncing (or possibly WebRTC), but users with a State Transition account will get something like 20M/year.

Functions

Basic

 Sum(a,b) => a+b

Named

 Triangle(l length, b base) => 0.5*l*b

Namespaces

Breaks up working areas. Namespaces should be lazy loaded.

Graphing

To consider

  • setting the range
  • setting the height (or auto-setting)

Other graphs

  • Parametric
  • Polar
  • Statistical
    • bar
    • box

For performance, it may be worth generating the graph in passes, producing a usable graph quickly, but increasing the precision over a few seconds.

Types

Not entirely sure how I want to handle this. By default, everything is just sort of a number. Maybe a big-num, maybe a representative type (keep fractions and some types of irrationals like exponents and factors of special irrationals).

  • Angles
    • degree
    • radian
    • percent
  • Int
  • Double (for faster computation)
  • Matrices
  • Complex

It would also be good to have "unit" type. This would be "family", "type" and "factor". So kg would have a factor of "k" a type of "g" which is in the family "mass".

Core

Operators

 Arithmetic: +, -, *, /
 Modular: //, %
 Exponent: **
 Binary: &, |, ~, ^
 Compare: =, <, >, <>
 Assign: =>

Commands

  • use: switch namespace
  • graph: graphs a function
  • clear: clears the log

Modules

Written in JavaScript (duh). They are imported as namespaces.

Need to Support

  • Basic algebra/arithmatic
  • Graphing; basic 2d/3d and color for higher dimensions
  • Geometry
    • Trig funcs
    • area (namespace)
    • volume (namespace)
  • Find roots: given a function, find the roots
  • Statistics

Appearance

A text-box across the top for input. As you type, it will attempt validation. If it can evaluate without invoking non-functional commands it will update the output in real time. When the user hits enter, two lines will be added to the log, one with the input, one with the output.