  We present a generalized piecewise polytropic parameterization for the
neutron-star equation of state using an ansatz that imposes continuity in not
only pressure and energy density, but also in the speed of sound. The universe
of candidate equations of state is shown to admit preferred dividing densities,
determined by minimizing an error norm consisting of integral astrophysical
observables. Generalized piecewise polytropes accurately reproduce
astrophysical observables, such as mass, radius, tidal deformability and mode
frequencies, as well as thermodynamic quantities, such as the adiabatic index.
This makes the new EOS useful for Bayesian parameter estimation from
gravitational waveforms. Moreover, since they are differentiable, generalized
piecewise polytropes can improve pointwise convergence in numerical relativity
simulations of neutron stars. Existing implementations of piecewise polytropes
can easily accommodate this generalization.
