

awk provides the builtin arithmetic functions shown in ``awk arithmetic functions''.
awk arithmetic functions
Function  Value returned 

atan2(y,x)  arctangent of y/^x in the range Pi to Pi 
cos(x)  cosine of x, with x in radians 
exp(x)  exponential function of x 
int(x)  integer part of x truncated towards 0 
log(x)  natural logarithm of x 
rand  random number between 0 and 1 
sin(x)  sine of x, with x in radians 
sqrt(x)  square root of x 
srand(x)  x is new seed for rand 