  This paper introduces an efficient algorithm for computing the general
oscillatory matrix functions. These computations are crucial for solving
second-order semi-linear initial value problems. The method is exploited using
the scaling and restoring technique based on a quadruple angle formula in
conjunction with a truncated Taylor series. The choice of the scaling parameter
and the degree of the Taylor polynomial relies on a forward error analysis.
Numerical experiments show that the new algorithm behaves in a stable fashion
and performs well in both accuracy and efficiency.
