Copyright © 1997 The Open Group

log10 - base 10 logarithm function

`#include <math.h> double log10(double`

x);

Thelog10()function computes the base 10 logarithm ofx, log_{10}(x). The value ofxmust be positive.An application wishing to check for error situations should set

errnoto 0 before callinglog10(). Iferrnois non-zero on return, or the return value is NaN, an error has occurred.

Upon successful completion,log10()returns the base 10 logarithm ofx.If

xis NaN, NaN is returned anderrnomay be set to [EDOM].If

xis less than 0, -HUGE_VAL or NaN is returned, anderrnois set to [EDOM].If

xis 0, -HUGE_VAL is returned anderrnomay be set to [ERANGE].

Thelog10()function will fail if:

- [EDOM]
- The value of
xis negative.The

log10()function may fail if:

- [EDOM]
- The value of
xis NaN.- [ERANGE]
- The value of
xis 0.No other errors will occur.

None.

None.

None.

isnan(),log(),pow(),<math.h>.

Derived from Issue 1 of the SVID.

Copyright © 1997 The Open Group

[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]