aboutsummaryrefslogtreecommitdiff
path: root/sys/vops/lz/asumx.x
blob: 936cdaf390b15deb7cb96185af1932a55119e58b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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.

complex procedure asumx (a, npix)

complex	a[ARB]
int	npix
int	i

complex	sum

begin
	sum = (0.0,0.0)
	do i = 1, npix
	    sum = sum + a[i]
	
	return (sum)
end