HardenedBSD/contrib/awk/test/math.awk
1997-10-14 18:17:11 +00:00

11 lines
262 B
Awk

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)
}