diff options
Diffstat (limited to 'sys/vops/lz/asuml.x')
-rw-r--r-- | sys/vops/lz/asuml.x | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/vops/lz/asuml.x b/sys/vops/lz/asuml.x new file mode 100644 index 00000000..4a2f9ec1 --- /dev/null +++ b/sys/vops/lz/asuml.x @@ -0,0 +1,20 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +# ASUM -- Vector sum. Take care to prevent integer overflow by returning +# a floating point sum. + +double procedure asuml (a, npix) + +long a[ARB] +int npix +int i + +double sum + +begin + sum = 0 + do i = 1, npix + sum = sum + a[i] + + return (sum) +end |