aboutsummaryrefslogtreecommitdiff
path: root/math/ieee/chap1/ord1.f
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /math/ieee/chap1/ord1.f
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'math/ieee/chap1/ord1.f')
-rw-r--r--math/ieee/chap1/ord1.f24
1 files changed, 24 insertions, 0 deletions
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