  Context: The cosmic microwave background (CMB) spectrum probes physical
processes and astrophysical phenomena occurring at various epochs of the
Universe evolution. Current and future CMB absolute temperature experiments are
aimed to the discovery of the very small distortions such those associated to
the cosmological reionization process or that could be generated by different
kinds of earlier processes. The interpretation of future data calls for a
continuous improvement in the theoretical modeling of CMB spectrum. Aims: In
this work we describe the fundamental approach and, in particular, the update
to recent NAG versions of a numerical code, KYPRIX, specifically written for
the solution of the Kompaneets equation in cosmological context, first
implemented in the years 1989-1991, aimed at the very accurate computation of
the CMB spectral distortions under quite general assumptions. Methods: We
describe the structure and the main subdivisions of the code and discuss the
most relevant aspects of its technical implementation. Results: We present some
of fundamental tests we carried out to verify the accuracy, reliability, and
performance of the code. Conclusions: All the tests done demonstrates the
reliability and versatility of the new code version and its very good accuracy
and applicability to the scientific analysis of current CMB spectrum data and
of much more precise measurements that will be available in the future. The
recipes and tests described in this work can be also useful to implement
accurate numerical codes for other scientific purposes using the same or
similar numerical libraries or to verify the validity of different codes aimed
at the same or similar problems.
