March 2018
Beginner to intermediate
416 pages
9h 24m
English
The sin(expr) function returns the sine of the expression expr, where expr is expressed in radians. The following code block shows an example of a sine function:
$ vi sinefunc.awkBEGIN { print "sin(90) = ", sin(90); print "sin(45) = ", sin(45); }$ awk -f sinefunc.awk
The output of the execution of the previous code is as follows:
sin(90) = 0.893997sin(45) = 0.850904
Read now
Unlock full access