预订演示

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

前页 后页

log10

Common logarithm.

SYNOPSIS:

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

DESCRIPTION:

Returns logarithm to the base 10 of x.

The argument is separated into its exponent and fractional parts. The logarithm of the fraction is approximated by:

log(1+x) = x - 0.5 x**2 + x**3 P(x)/Q(x).

ACCURACY:
Relative error:
arithmetic domain # trials peak rms
IEEE 0.5, 2.0 30000 1.5e-16 5.0e-17
IEEE 0, MAXNUM 30000 1.4e-16 4.8e-17
DEC 1, MAXNUM 50000 2.5e-17 6.0e-18

In the tests over the interval [1, MAXNUM], the logarithms of the random arguments were uniformly distributed over [0, MAXLOG].

ERROR MESSAGES:

singularity: x = 0; returns -INFINITY
domain: x < 0; returns NAN