Add a binary average function to the spec.