From 309c5d8f7ff8c36235222d079955cd3783bb7ad0 Mon Sep 17 00:00:00 2001 From: wukong Date: Mon, 18 Dec 2023 12:37:31 -0800 Subject: Added a partially working function performing LU decomposition on a square matrix, ludcmp.awk. This is providing correct answers on _some_ test data, further testing debugging required here. --- em.awk | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 em.awk (limited to 'em.awk') diff --git a/em.awk b/em.awk new file mode 100644 index 0000000..1297153 --- /dev/null +++ b/em.awk @@ -0,0 +1,13 @@ +#!/usr/bin/awk -f + +BEGIN { + ARGV[1] ? OFMT = "%." ARGV[1] "g" : OFMT = "%.12g" + + ### constants + pi = 4.0*atan2(1,1) # rad + c0 = 299792458E0 # m/s, exact + mu0 = (4.0E-7)*pi # H/m + epsilon0 = (mu0*c0^2)^-1 # F/m + + print pi, c0, mu0, epsilon0 +} -- cgit v1.2.3