split out arithmetic and mass; also dropped dependency on mspire::spectrum