A Fortran subroutine applies the method of {\itI. C. Demetriou} and {\itM. J. D. Powell} [IMA J. Numer. Anal. 11, No. 3, 433--448 (1991; Zbl 726.65009)] to restore convexity in $n$ measurements of a convex function contaminated by random errors. The method minimizes the sum of the squares of the errors, subject to nonnegativity of second divided differences, in two phases. \parFirst, an approximation close to the optimum is derived in $O(n)$ operations. Then, this approximation is used as the starting point of a dual-feasible quadratic programming algorithm that completes the calculation of the optimum. The constraints allow $B$-splines to be used, which reduce the problem to an equivalent one with fewer variables where the knots of the splines are determined automatically from the data points due to the constraint equations. The subroutine benefits from this reduction, since common submatrices that occur during the calculation are updated suitably. Iterative refinement improves the accuracy of some calculations when round-off errors accumulate. \parThe subroutine has been applied to a variety of data having substantial differences and has performed fast and stably even for small data spacing, large $n$, and single-precision arithmetic. Driver programs and examples with output are provided to demonstrate the use of the subroutine. (Source: http://dl.acm.org/)

This software is also peer reviewed by journal TOMS.