Borland C++ reference

loglO, loglOl

raw OCR

Calculates log io(^')-

Defined in header <math.h>

Syntax

Real versions:                    Complex version:
#include <math.h>                #include <complex.h>
double loglO(double x);           complex loglO(complex  x);
long double loglOKlong double x);

Portability

DOSUNIXWindowsANSI CC++ only
log 101 ■■
Real log 10 ■■■■
Complex log W ■■■

Remarks

loglO calculates the base 10 logarithm of x. loglOl is the long double version; it takes a long double argument and returns a long double result.

The complex common logarithm is defined by

loglO(z) = log(z) / log(lO)

Return value

On success, Iog10 (or loglOl) returns the value calculated, log-^oix).

If the argument x passed to these functions is real and less than 0, the global variable errno is set to

EDOM Domain error

If X is 0, these functions return the value negative HUGEVAL(logl 0) or
_LHUGE_VAL(loglOl).

Error handling for these routines can be modified through the functions matherr and _matherrl.

See also

Example

#include <math.h>
#include <stdio.h>
int main(void)

   double result, x = 800.6872;
   result = loglO(x);
   printfC'The common log of %lf     *lf\n", X, result);
   return 0;

Differences from modern implementations

Nothing recorded yet.

Modern references

These are search links, not yet checked by hand.

Extraction notes

  • heading `loglOJoglOl` read as `loglO, loglOl`