User Tools

Site Tools


wiki:webgis_calc_operators_functions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
wiki:webgis_calc_operators_functions [2018/09/15 22:46] – created andiwiki:webgis_calc_operators_functions [2018/09/16 00:34] (current) andi
Line 1: Line 1:
 +List of mathematical operators and functions which can be used in the AlpES WebGIS calculation tool.
 +
 +Note: remember to always put a space character between operators and operands. While some operators work without extra space characters, others might not.
 +
 +====== Mathematical Operators ======
 +
 +^Operator^Description^Example^Value|
 |+|addition|2 + 3|5| |+|addition|2 + 3|5|
 |-|subtraction|2 - 3|-1| |-|subtraction|2 - 3|-1|
 |*|multiplication|2 * 3|6| |*|multiplication|2 * 3|6|
-|/|division (integer division truncates the result)|/ 2|2| +|/|division (integer division truncates the result) - 0 as argument not allowed|/ 2|2| 
-|%|modulo (remainder)|5 % 4|1| +|%|modulo (remainder of division- 0 as argument not allowed|5 % 2|1| 
-||exponentiation (associates left to right)|2.0 ^ 3.0|8| +|/\|exponentiation (associates left to right)|2 /\ 3|8| 
-|/|square root|/ 25.0|5| +|I/|square root - negative argument not allowed|/ 25|5| 
-|/|cube root|/ 27.0|3| +|II/|cube root - negative argument not allowed|/ 27|3| 
-|!|factorial|5 !|120+|@|absolute value|@ -2.42|2.42
-|!!|factorial (prefix operator)|!! 5|120+ 
-|@|absolute value|-5.0|5+====== Mathematical Functions ====== 
-|&|bitwise AND|91 & 15|11+ 
-||bitwise OR|32 3|35+^Function^Description^Example^Result| 
-|#|bitwise XOR|17 # 5|20+|abs(x)|absolute value, same as operator @|abs(-2.42)|2.42| 
-|~|bitwise NOT|~1|-2| +|cbrt(x)|cube root|cbrt(27.0)|3
-|<<|bitwise shift left|1 << 4|16+|ceil(x)|nearest integer greater than or equal to argument|ceil(-42.8)|-42| 
-|>>|bitwise shift right|8 >> 2|2|+|degrees(x)|radians to degrees|degrees(0.5)|28.64…| 
 +|div(y, x)|integer quotient of y/x|div(9, 4)|2| 
 +|exp(x)|exponential|exp(1.0)|2.718…
 +|floor(x)|nearest integer less than or equal to argument|floor(-42.8)|-43
 +|ln(x)|natural logarithm - 0 as argument not allowed|ln(2.0)|0.693…| 
 +|log(x)|base 10 logarithm - 0 as argument not allowed|log(100.0)|2
 +|log(b, x)|logarithm to base b|log(2.0, 64.0)|6
 +|mod(x, y)|remainder of y/x|mod(9, 4)|1| 
 +|pi()|pi constant|pi()|3.141…| 
 +|power(x, y)|x raised to the power of y|power(9, 2)|729
 +|radians(x)|degrees to radians|radians(45.0)|0.785…| 
 +|round(x)|round to nearest integer|round(42.4)|42| 
 +|round(x, y)|round to y decimal places|round(32.36, 1)|32.4| 
 +|sign(x)|sign of the argument (-1, 0, +1)|sign(-4.1)|-1
 +|sqrt(x)|square root, same as operator I\ - negative argument not allowed|sqrt(2.0)|1.414…| 
 +|trunc(x)|truncate toward zero|trunc(42.8)|42| 
 +|trunc(x, y)|truncate to y decimal places|trunc(42.43, 1)|42.4| 
 + 
 +====== Random Functions ====== 
 + 
 +^Function^Description| 
 +|random()|random value in the range 0.0 <= x < 1.0|
  
 \\ \\
  
  
wiki/webgis_calc_operators_functions.1537044361.txt.gz · Last modified: 2018/09/15 22:46 by andi