HardenedBSD/contrib/awk/test/math.awk

11 lines
262 B
Awk
Raw Normal View History

1997-10-14 20:17:11 +02:00
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)
}