aboutsummaryrefslogtreecommitdiffstats
path: root/test/numfunc.awk
diff options
context:
space:
mode:
Diffstat (limited to 'test/numfunc.awk')
-rw-r--r--test/numfunc.awk19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/numfunc.awk b/test/numfunc.awk
new file mode 100644
index 00000000..de1d7a4d
--- /dev/null
+++ b/test/numfunc.awk
@@ -0,0 +1,19 @@
+BEGIN {
+ y = 8
+ x = 1
+ while (x < 256) {
+ print "arctan", y/x, atan2(y , x)
+ x += x
+ }
+ print ""
+ pi8 = atan2(1, 1) / 2
+ arg = 0
+ for (i = 0; i <= 8; i++) {
+ print "cos sin", arg, cos(arg), sin(arg)
+ arg += pi8
+ }
+ print ""
+ for (i = -5; i<= 5; i++) {
+ print "exp log", i, exp(i), log(exp(i))
+ }
+}