series: an implementation detail change in the way sin/cos are selected.

Now it's more in line with the approach taken in the toolboxes.