  We generalize results of Duke, Garcia, Hyde, Lutz and others on the
distribution of sums of roots of unity related to Gaussian periods to obtain
equidistribution of similar sums over zeros of arbitrary integral polynomials.
We also interpret these results in terms of trace functions, and generalize
them to higher rank trace functions.
