arbitrary-precision math evaluator
Primary target is WebAssembly, but should work as a go package as well.
--------------WARNING: VERY MUCH A WORK IN PROGRESS--------------- DO NOT EXPECT VALUES TO BE ARBITRARILY ACCURATE OR FOR THE PACKAGE TO WORK AS INTENDED JUST YET.
- accuracy
- speed
- actually implementing things
Anything wrapped in parentheses ((expr)
) or pipes (|expr|
) that evaluates to a single value is valid.
E
- Euler's numberi
- Imaginary unitTau
- Tau (2*PI)PI
- Pi
E + 10
Tau * 40
Pi - 3.14
sin(x)
- sinecos(x)
- cosinetan(x)
- tangentasin(x)
- arcsinacos(x)
- arccosineatan(x)
- arctangentsqrt(x)
- square rootabs(x)
- absolute valuecsx(x)
- cosecantsec(x)
- secantcot(x)
- cotangentlog_b(x)
- base-b logarithm
|expr|
- returns the absolute value of the given expressionint + int
- returns the sum of two numbersint - int
- returns the difference of two numbersint * int
- returns the product of two numbersint / int
- returns the quotient of two numbersint - int
- returns the difference of two numbersint % int
- performs a modulo operation on two numbersnum ^ power
- raises a number to the given power- (not implemented)
exponent ^/ int
- returns the nth (exponent) roots of the given int
- make functions/conversions able to fit in the Order of Operations hierarchy evaluation
-
equality checks (gt/lt/equal)
-
unit conversion
mi
ormile
(abbreviated/full units)
-
variables/substitution
-
trigonometry
-
calculus
-
linear algebra
-
constants
-
engineering
- physics
- kinematics
- civil - structural properties, etc.
- thermodynamics and chemistry
- physics
-
compile-time math macro?
-
arbitrary-precision math
-
comment and documentation system
-
finish language syntax
-
multiline parsing
-
logarithms
-
factorials with
x!
-
formal specification
-
statistics
-
graphing backend
-
matrix and vector ops
-
financials
-
boolean algebra
==
!=
- etc.
-
functions
- nthRoot
- nth
- order of operations doesn't work
- nesting values doesn't work