Skip to content

Latest commit

 

History

History
80 lines (61 loc) · 1.85 KB

OPERATIONS.md

File metadata and controls

80 lines (61 loc) · 1.85 KB

Valid Tokens

Variables

The following variables are supported:

symbol value
literal Literal float value
x Dependent on x-position of graph
t Dependent on time1
pi Pi2
e Euler's constant3
g Gravity on Earth4

Operations

Unary Operations

The following unary operations are supported:

symbol operation
- Negation

Binary Operations

The following binary operations are supported:

symbol operation
+ Addition
- Subtraction
* Multiplication
/ Division
^ Exponentiation
% Floating-point Modulo Operation

Functions

The following functions are supported.

symbol operation
sin Sine
cos Cosine
tan Tangent
acos Arc Cosine
asin Arc Sine
atan Arc Tangent
cosh Hyperbolic Cosine
sinh Hyperbolic Sine
tanh Hyperbolic Tangent
acosh Inverse Hyperbolic Cosine
asinh Inverse Hyperbolic Sine
atanh Inverse Hyperbolic Tangent
rad Convert to radians
deg Convert to degrees
log Natural Logarithm
abs Absolute value of sub-expression
round Round result of sub-expression
sign Sign of sub-expression5

Functions must be followed by a sub-expression in paranthesis, i.e. sin(x)

Other

The following are also supported:

symbol effect
( Begin sub-expression.
) End sub-expression.

Footnotes

  1. Measured in seconds.

  2. Roughly 3.14.

  3. Roughly 0.577.

  4. Roughly 9.81.

  5. That is, -1 for a negative result, 1 for a positive result, and 0 otherwise.