预订演示

请注意 : 本帮助页面不适用于最新版本的Enterprise Architect. 最新的帮助文档在这里.

前页 后页

cos

Circular cosine.

SYNOPSIS:

   double x, y, cos();
   y = cos(x);

DESCRIPTION:

Range reduction is into intervals of pi/4. The reduction error is nearly eliminated by contriving an extended precision modular arithmetic.

Two polynomial approximating functions are employed.
Between 0 and pi/4 the cosine is approximated by:
      1  -  x**2 Q(x**2).
Between pi/4 and pi/2 the sine is represented as:
      x  +  x**3 P(x**2).

ACCURACY:
                      Relative error:
arithmetic     domain      # trials      peak         rms
    IEEE   -1.07e9,+1.07e9   130000       2.1e-16     5.4e-17
    DEC          0,+1.07e9    17000       3.0e-17     7.2e-18