From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- math/llsq/gen.f | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 math/llsq/gen.f (limited to 'math/llsq/gen.f') diff --git a/math/llsq/gen.f b/math/llsq/gen.f new file mode 100644 index 00000000..e7933d6d --- /dev/null +++ b/math/llsq/gen.f @@ -0,0 +1,31 @@ + function gen(anoise) +c c.l.lawson and r.j.hanson, jet propulsion laboratory, 1972 dec 15 +c to appear in 'solving least squares problems', prentice-hall, 1974 +c generate numbers for construction of test cases. + mi=891 + mj=457 + i=5 + j=7 + aj=0. +c + if (anoise) 10,30,20 + 10 gen=0. + return +c +c the sequence of values of j is bounded between 1 and 996 +c if initial j = 1,2,3,4,5,6,7,8, or 9, the period is 332 +c + 20 j=j*mj + j=j-997*(j/997) + aj=j-498 +c the sequence of values of i is bounded between 1 and 999 +c if initial i = 1,2,3,6,7, or 9, the period will be 50 +c if initial i = 4 or 8 the period will be 25 +c if initial i = 5 the period will be 10 +c + 30 i=i*mi + i=i-1000*(i/1000) + ai=i-500 + gen=ai+aj*anoise + return + end -- cgit