Summary table of built-in arithmetic functions

The following table summarizes the different built-in arithmetic functions available in AWK:

Function

Value returned

sin(x)

Returns the sine of x, with x in radians

cos(x)

Returns the cosine of x, with x in radians

atan2(x,y)

Returns the arc tangent of x/y in the range of -22/7 to +22/7

int(x)

Returns the integer part of x, truncated towards 0

log(x)

Returns the natural (base-e) logarithm of x

exp(x)

Returns e to the power of x , e^x

sqrt(x)

Returns the square root of x

rand()

Generates the random number x, where 0 <= x < 1

srand()

X is the new seed value for rand()

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.161.225