Ants make no use of The Astronomical Almanac or electronic calculators. ''Certainly,'' the Swiss zoologists note, ''insects, unlike astronomers, do not perform spherical trigonometry in the sky.'' Yet while they may not use the mathematics humans have invented to cope with the heavens, some ants, at least, do something equivalent that enables them to use the ever-changing position of the sun for orientation.

You might think that a lowly ant scurrying along the ground would see no farther than the next pebble. But Bert Holldobler of Harvard University has shown that some forest ants use the patterns of the leaf canopy overhead as a guide. Also, a number of investigators have demonstrated that a wide range of animals, including ants, orient with the aid of the sun. The central puzzle has been to explain how such animals, especially ants, compensate for the sun's ever-changing position when they use it for a compass. The fact that the sun's azimuth does not change at a constant rate makes such compensation difficult.

This is the question the Swiss zoologists investigated in Tunisia, using large, long-legged desert ants of the genus Cataglyphis. These ants do not follow scent trails. They appear to use a sense of the local terrain plus celestial clues, such as solar position, to navigate.

To do this, they have to know how to reorient themselves with respect to the sun as its position changes so they can maintain a constant sense of direction on the ground. This means they must have a sense of how far around the horizon the sun has moved, even when they have not seen it for hours. They may, for example, have been trapped in a moist, light-tight bottle by Swiss experimenters.

The zoologists say their data ''show that ants do indeed compensate for the variable rate of the sun's azimuth even if they have not seen the sky for several hours.'' They add that the data also suggest ''that the ants acquire their knowledge of the sun's azimuth movement by interpolation between successive memorized (solar) positions . . . .''

Fred C. Dyer and James L. Gould recently reported in Science that bees show a similar ability. They can orient themselves on cloudy days using their memory of how the sun moves with respect to local landmarks.