Squinting at Power Series

By M. Douglas McIlroy (AT&T Bell Laboratories Murray Hill, New Jersey 07974)

ABSTRACT

Data streams are an ideal vehicle for handling power series. Stream implementations can be read off directly from simple recursive equations that define operations such as multiplication, substitution, exponentiation, and reversion of series. The bookkeeping that bedevils these algorithms when they are expressed in traditional languages is completely hidden when they are expressed in stream terms. Communicating processes are the key to the simplicity of the algorithms. Working versions are presented in newsqueak, the language of Pike’s ‘‘squint’’ system; their effectiveness depends critically on the stream protocol.