A calculator! Just put your expression or expressions in, and it'll simplify them (using radians). Instructions are in default expressions.
no commas in numbers
1^2^3 will be interpeted as 1^(2^3)
unary negation (like -x) must be written as 0-x
for now, exponents only reduce when used with integers more than 0 or (sometimes) the inverse of those
if you want to write 1/3, DO NOT WRITE 0.3333333. instead, just write (1/3). well, IEEE-754 point will round it, but oh well.
ofc this is buggy, and if you just need normal calculation use Desmos or wolfram alpha
This calculator suppourts the following:
succesor (S(x)): adds 1 to a number (no, I don't actually use peano axioms for this)
addition (x+y): if y is 0, is x, if y can be written as S(z), is S(x+z), and will generalize to non-natrual numbers
subtraction (x-y): if x-y=z, then x=y+z
multiplication (x*y): if y is 0, is 0, if y can be written as S(z), is x*y + x, will generalize to non-natrual numbers, and by default evaluated before addition and subtraction
division (x/y): if x/y=z, then x=y*z
exponentiation (x^y): if x and y are 0, is 1 (deal with it), if x isn't zero and y is 0, is 1, if y can be written as S(z), is x^y * x, will generalize (for the most part) to non-natrual numbers, and is by default evalutated before addition, subraction, multiplication, and division
parentheses ((x)): is the value of x, even in situations like 5*(4+7), where addition would otherwise go before multiplication
also parentheses ((x,y)): used for inputs of things like min(x,y), to show 2 inputs, and also would make parsing numbers with commas too hard
min (min(x,y)): if x is less than y, x, otherwise y
max (max(x,y)): min but greater than instead of less than
abs (abs(x)): the euclidean distance from 0 to x
= (x=y): the x is defined as y
also = (x==y): checks if x is the same as y
> (x>y): checks if x is greater than y
< (x<y): checks if x is less than y
>= (x>y): checks if x is greater than or equal to y
<= (x>y): checks if x is less than or equal to y
!= (x!=y): checks if x is not equal to y, and works as xor
& (x&y): only true if x is true and y is true
| (x|y): only false if x is false and y is false
! (!(x)): only true if x is false
exp (exp(x)): e^x
ln (ln(x)): the value y such that e^y = x
log2 (log2(x)): the value y such that 2^y = x
log10 (log10(x)): the value y such that 10^y = x
log (log(b,x)): the value y such that b^y = x
sqrt (sqrt(x)): the number that, when multiplied by itself, is x
cbrt (cbrt(x)): the number that, when multiplied by [itself multiplied by itself], is x
round (round(x)): the integer closest x
sin (sin(x)): let's say I have an arrow starting at the center of a circle whose radius is 1 meter, and it is rotated (starting from pointing +x, counterclockwise, around the center of the circle) by an angle of θ, where if θ=τ we rotate 360 degrees, then sin(θ) is the y coordinate (how far up/down) of the arrow's tip
cos (cos(x)): sin but x coordinate (how far left/right)
tan (tan(x)): sin(x)/cos(x), or the distance you must travel going only in the direction the circle was curving when yiu started to get to the x axis starting from the point where your rotated arrow touches the circle
asin (asin(x)): the number θ closest to 0 such that x=sin(θ)
acos (acos(x)): asin but cos
atan (atan(x)): asin but tan
atan2 (atan2(x,y)): the angle you must go to get to the point (y,x), calculated as atan(y/x) with a whole load of exceptions where atan(y/x) would break
comment (//x): if a line starts with //, it is ignored
error messages with full subject-verb agreement (in English at least), without using (s) to cheat (yes I did waste like 10 minutes programming all 3 cases)
changelog (new.bugfix)
1.0: added variable definition, fixed 1+1 equaling 11, and made a whole new instruction manual... and oh geez this thing is nearing gravity simulator in length