We generalize previous work [J. Chem. Phys. 94, 597 (1991)] on an alternative to the Ewald method for the numerical simulations of Coulomb fluids. This new method consists in using as a simulation cell the three-dimensional surface of a four-dimensional sphere, or hypersphere. Here, we consider the case of polar fluids and electrolyte solutions. We derive all the formal expressions which are needed for numerical simulations of such systems. It includes a derivation of the multipolar interactions on a hypersphere, the expansion of the pair-correlation functions on rotational invariants, the expression of the static dielectric constant of a polar liquid, the expressions of the frequency-dependent conductivity and dielectric constant of an ionic solution, and the derivation of the Stillinger-Lovett sum rules for conductive systems.