diff options
Diffstat (limited to 'sys/vops/lz/arcpl.x')
-rw-r--r-- | sys/vops/lz/arcpl.x | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/vops/lz/arcpl.x b/sys/vops/lz/arcpl.x new file mode 100644 index 00000000..3f3c5b39 --- /dev/null +++ b/sys/vops/lz/arcpl.x @@ -0,0 +1,24 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +# ARCP -- Reciprocal of a constant divided by a vector. No divide by zero +# checking is performed. + +procedure arcpl (a, b, c, npix) + +long a # constant numerator +long b[ARB] # vector denominator +long c[ARB] # output vector +int npix +int i + +begin + if (a == 0) { + call aclrl (c, npix) + } else if (a == 1) { + do i = 1, npix + c[i] = 1 / b[i] + } else { + do i = 1, npix + c[i] = a / b[i] + } +end |