]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.runtime/src-isv/Arithmetic.mediawiki
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.runtime / src-isv / Arithmetic.mediawiki
1 == Arithmetic ==\r
2 \r
3 Writing mathematical formulas in SCL is mostly unsurprising.\r
4 <pre>0.5*m*v^2 + m*g*h</pre>\r
5 \r
6 When applying functions, parentheses are not needed around the \r
7 parameters and multiple parameters are separated by whitespace:\r
8 <pre>sin x + sin y</pre>\r
9 <pre>atan2 y x</pre>\r
10 \r
11 The following mathematical functions are provided in the standard library:\r
12 {|\r
13 | ^ \r
14 | exponentiation\r
15 |-\r
16 | *, / \r
17 | multiplication and division\r
18 |-\r
19 | div,mod\r
20 | integer division and remainder\r
21 |-\r
22 | +, - \r
23 | addition and substraction\r
24 |-\r
25 | ==, != \r
26 | equality and inequality\r
27 |-\r
28 | <, <=, >=, > \r
29 | comparison\r
30 |-\r
31 | abs \r
32 | absolute value\r
33 |-\r
34 | min, max \r
35 | minimum and maximum\r
36 |-\r
37 | pi \r
38 | constant pi\r
39 |-\r
40 | exp \r
41 | exponential function\r
42 |-\r
43 | log \r
44 | natural logarithm\r
45 |-\r
46 | sqrt \r
47 | square root\r
48 |-\r
49 | sin, cos, tan \r
50 | trigonometric functions\r
51 |-\r
52 | asin, acos, atan \r
53 | inverse trigonometric functions\r
54 |-\r
55 | atan2 \r
56 | angle of a point\r
57 |-\r
58 | sinh, cosh, tanh \r
59 | hyberbolic functions\r
60 |-\r
61 | floor, ceil \r
62 | rounding down and up to integer\r
63 |}\r