Math Functions¶
Contents
Modulus¶
Modulus in technetium always gives a non-negative result. So, for example:
print(-2 % 3)
will print 1, since -2 is equivalent to 1 mod 3.
Numeric Functions¶
- [trigonometric function]([float or int]) [float]
- Available trigonometric functions are [sin, cos, tan, arcsin, arccos, arctan] 
- abs([float or int]) [float or int]
- Returns the absolute value of its argument 
- sqrt([float or int]) [float]
- Returns the square root of its argument 
- exp([float or int]) [float]
- Returns e to the power of its argument 
- ln([float or int]) [float]
- Returns the natural logarithm of its argument 
Random Functions¶
- rand() [float]
- Returns a random floating point number between 0 and 1 
- rand_range([float or int], [float or int]) [float or int]
- Returns a random number between it’s first argument, and up to but not including its second argument 
- rand_normal(mean:[float or int]?, stdev:[float or int]?) [float]
- Returns a randomly sampled number in the normal distribution of a given mean and standard deviation (or 0 and 1 respectively if not given)