Yorick Reference Card

Web Home
Getting Started
Manual
Quick Reference
Language Reference
Function Reference
I/O Reference

Language Reference Function Reference Including Source Files Comments Issuing Shell Commands Matrix Multiplication Information About Variables Elementary Functions Advanced Array Indexing Index Range Functions Logical Functions Interpolation and Lookup Functions Sorting Transposing Manipulating Strings Generating Simple Meshes Using Pointers Instancing Data Structures Reshaping Arrays I/O Reference | # Yorick Function Reference ## Elementary Functions `abs, sign` absolute value, arithmetic sign `sqrt` square root `floor, ceil` round down, round up to integer `conj` complex conjugation `pi` the constant 3.14159265358979323846... `sin, cos, tan` trigonometric functions (of radians) `asin, acos, atan` inverse trigonometric functions `sinh, cosh, tanh, sech, csch` hyperbolic functions `asinh, acosh, atanh` inverse hyperbolic functions `exp, log, log10` exponential and logarithmic functions `min, max` find minimum, maximum of array `sum, avg` find sum, average of array `random` random number generator The `atan` function takes one or two arguments; `atan(t)` returns a value in the range (-p/2,p/2]), while `atan(y,x)` returns the counterclockwise angle from (1,0) to (x,y) in the range (-p,p]). The `abs` function allows any number of arguments; for example, `abs(x,y,z)` is the same as `sqrt(x^2+y^2+z^2)`. The `sign` satisfies `sign(0)==1` and `abs(z)*sign(z)==z` always (even when `z` is `complex`). The `min` and `max` functions return a scalar result when presented with a single argument, but the pointwise minimum or maximum when presented with multiple arguments. The `min`, `max`, `sum`, and single argument `abs` functions return integer results when presented integer arguments; the other functions will promote their arguments to a real type and return reals.