| | Yanaconda supports a number of built-in functions,
mainly for doing math. These functions can appear anywhere in an expression. If the function argument is itself an expression,
you must enclose it in parentheses. Remember to leave a space between the function name and the opening parenthesis.
for i = 0 to 180 step 60
j = sqrt i
k = cos (i)
Print 'Sqrt of (i) = (j), Cos of (i) = (k)'
Sqrt of 0 = 0.00000000000000e+00, Cos of 0 = 1.00000000000000e+00
Sqrt of 60 = 7.74596669241483e+00, Cos of 60 = 5.00000000000015e-01
Sqrt of 120 = 1.09544511501033e+01, Cos of 120 = -4.99999999999969e-01
Sqrt of 180 = 1.34164078649987e+01, Cos of 180 = -1.00000000000000e+00
Unlike C and Python, trigonometric functions expect their arguments in normal degrees.
If a string is passed to the rnd function, it will randomize each alphanumeric character such that the replacement has a lower alphanumeric ASCII code. E.g. when passing the string
'ffffff', the result will be a random RGB color. The following functions are available:
| | abs X
| Absolute value of X | | acos X
| Arc cosine of X, returned in degrees | | asin X
| Arc sine of X, returned in degrees | | atan X
| Arc tangent of X, returned in degrees | | cos X
| Cosine of X, X in degrees | | count X
| The number of occurrences of variables with root name X and different terminal numbers |
| cube X | Volume of a cube with length X
= X*X*X | | curt X | Cubic root |
| dirname X | Get the directory name of the path in string X
(discarding additional filename or slash) | | exp X |
e (the base of natural logarithms) raised to the power X |
| log X | Natural logarithm of X |
| log10 X | Base-10 logarithm of X |
| join X | Join all variables with root name X to a single weak string,
currently in random order | | max X | The maximum value in list X
(all variables with root name X) | | mean X | The mean value of list X
(all variables with root name X) | | min X | The minimum value in list X
(all variables with root name X) | | onein X | A random element in list X
(all variables with root name X) | | ord X | The ASCII code of string X,
summed up if string contains more than one character | | rnd X
| A random number in the range [0..X[. If the argument is a string,
each character is randomized | | round X | X rounded to the closest integer |
| sign X | The sign of X, either 1, 0 or
-1. | | sin X | Sine of X, X in degrees |
| sqr X | Area of a square with length X
= X*X | | sqrt X | Square root |
| stddev X | The standard deviation of list X
(all variables with root name X) | | sum X | The sum of all values in list X
(all variables with root name X) | | tan X | Tangent of X,
X in degrees | | trunc X | The integer part of X,
rounded towards zero. | |
|