summaryrefslogtreecommitdiff
path: root/test/math.awk
blob: 90a01dd83588f1af779a3123cd41dec1181acc28 (plain)
1
2
3
4
5
6
7
8
9
10
BEGIN {
	pi = 3.1415927
	printf "cos(%f) = %f\n", pi/4, cos(pi/4)
	printf "sin(%f) = %f\n", pi/4, sin(pi/4)
	e = exp(1)
	printf "e = %f\n", e
	printf "log(e) = %f\n", log(e)
	printf "sqrt(pi ^ 2) = %f\n", sqrt(pi ^ 2)
	printf "atan2(1, 1) = %f\n", atan2(1, 1)
}