  While magnetic fields are important in contemporary star formation, their
role in primordial star formation is unknown. Magnetic fields of order 10^-16 G
are produced by the Biermann battery due to the curved shocks and turbulence
associated with the infall of gas into the dark matter minihalos that are the
sites of formation of the first stars. These fields are rapidly amplified by a
small-scale dynamo until they saturate at or near equipartition with the
turbulence in the central region of the gas. Analytic results are given for the
outcome of the dynamo, including the effect of compression in the collapsing
gas. The mass-to-flux ratio in this gas is 2-3 times the critical value,
comparable to that in contemporary star formation. Predictions of the outcomes
of simulations using smooth particle hydrodynamics (SPH) and grid-based
adaptive mesh refinement (AMR) are given. Because the numerical viscosity and
resistivity for the standard resolution of 64 cells per Jeans length are
several orders of magnitude greater than the physical values, dynamically
significant magnetic fields affect a much smaller fraction of the mass in
simulations than in reality. An appendix gives an analytic treatment of
free-fall collapse, including that in a constant density background. Another
appendix presents a new method of estimating the numerical viscosity; results
are given for both SPH and grid-based codes.
