  We present a compact atomic clock interrogating ultracold 87Rb magnetically
trapped on an atom chip. Very long coherence times sustained by spin
self-rephasing allow us to interrogate the atomic transition with 85% contrast
at 5 s Ramsey time. The clock exhibits a fractional frequency stability of
$5.8\times 10^{-13}$ at 1 s and is likely to integrate into the
$1\times10^{-15}$ range in less than a day. A detailed analysis of 7 noise
sources explains the measured frequency stability. Fluctuations in the atom
temperature (0.4 nK shot-to-shot) and in the offset magnetic field
($5\times10^{-6}$ relative fluctuations shot-to-shot) are the main noise
sources together with the local oscillator, which is degraded by the 30% duty
cycle. The analysis suggests technical improvements to be implemented in a
future second generation set-up. The results demonstrate the remarkable degree
of technical control that can be reached in an atom chip experiment.
