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/ieee/chap1/ord1.f | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 math/ieee/chap1/ord1.f (limited to 'math/ieee/chap1/ord1.f') diff --git a/math/ieee/chap1/ord1.f b/math/ieee/chap1/ord1.f new file mode 100644 index 00000000..21e4494e --- /dev/null +++ b/math/ieee/chap1/ord1.f @@ -0,0 +1,24 @@ +c +c----------------------------------------------------------------------- +c subroutine: ord1 +c in-place reordering subroutine +c----------------------------------------------------------------------- +c + subroutine ord1(m, b) + dimension b(2) +c + k = 4 + kl = 2 + n = 2**m + do 40 j=4,n,2 + if (k-j) 20, 20, 10 + 10 t = b(j) + b(j) = b(k) + b(k) = t + 20 k = k - 2 + if (k-kl) 30, 30, 40 + 30 k = 2*j + kl = j + 40 continue + return + end -- cgit