cosine function x in radians. Don't forget SOHCAHTOA. Cosine = adjacent and hypotenuse.
CREATED2016-07-07 17:03:55.0
00-26-2D
UPDATED2016-07-07 17:04:05.0
exp(x)
Exponential function
CREATED2016-07-07 17:04:05.0
00-26-2E
UPDATED2016-07-07 17:04:12.0
int(x)
{ x = 5.8 numb = int(x) print numb }
Returns x truncated toward zero i.e. to the left on the number line.
Example:
would output 5.
CREATED2016-07-08 12:30:08.0
00-26-2F
UPDATED2016-07-08 12:30:14.0
log(x)
CREATED2016-07-08 12:37:00.0
00-26-30
UPDATED2016-07-08 12:37:05.0
rand()
CREATED2016-07-08 12:37:17.0
00-26-31
UPDATED2016-07-08 12:37:28.0
sin(x)
CREATED2016-07-08 12:37:28.0
00-26-32
UPDATED2016-07-08 12:37:33.0
sqrt(x)
CREATED2016-07-08 12:37:33.0
00-26-33
UPDATED2016-07-08 12:37:42.0
srand([expr])
CREATED2016-07-08 12:37:42.0
00-26-34
UPDATED2016-07-08 12:37:59.0
String Functions
CREATED2016-07-07 17:03:09.0
00-26-2B
UPDATED2016-07-07 17:03:16.0
asort(source[, dest])
a gawk extention, returns the number of elements in the array source. The contents of source are sorted usding normal gawk sorting rules. All the indecies are replaced with numeric values... 1, 2, 3, etc. If dest is provides, asort stores the sorted array in dest, leaving source unchanged.
CREATED2016-07-07 11:00:37.0
00-26-1C
UPDATED2016-07-07 17:02:37.0
gsub(r, s[, t])
gsub is for global substitution. gsub performs the same operation as sub with the exception that gsub replaces all occurances of s.
CREATED2016-07-07 16:58:31.0
00-26-22
UPDATED2016-07-07 17:02:41.0
index(string, whatToFind)
var = index("abcdef", "c")
Works like index in most any other language, searches string for whatToFind . Returns the index that whatToFind is located at. Returns zero (0) if whatToFind is not in string.
Example:
would retunr 3. Note: String positions in awk are numbered 1 to n.
CREATED2016-07-07 11:20:20.0
00-26-1E
UPDATED2016-07-07 17:02:42.0
length([string])
Returns the length of string. This function is overloaded, if the argument string is ommited, length returns the length of the field $0.