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