File: test_math.fawk

package info (click to toggle)
fungw 1.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,268 kB
  • sloc: ansic: 24,257; makefile: 500; sh: 32; awk: 9; perl: 8; tcl: 7; javascript: 7; ruby: 7; python: 6
file content (14 lines) | stat: -rw-r--r-- 419 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function main(ARGV)
{
	pi = 3.141592653589793238462643;

# a few simple calls to all three example functions our math engine declared
# to demonstrate the proper value is calculated and returned
	fawk_print("sin(0): ", my_sin(0));
	fawk_print("cos(0): ", my_cos(0));
	fawk_print("tan(0): ", my_tan(0));

	fawk_print("sin(pi): ", my_sin(pi));
	fawk_print("cos(pi): ", my_cos(pi));
	fawk_print("tan(pi): ", my_tan(pi));
}