OAR

RTEMS GNU Tools On-Line Library


log

PREV UP NEXT Bookshelf

1.21: log, logf---natural logarithms

Synopsis

#include <math.h>
double log(double x);
float logf(float x);

Description
Return the natural logarithm of x, that is, its logarithm base e (where e is the base of the natural system of logarithms, 2.71828...). log and logf are identical save for the return and argument types.

You can use the (non-ANSI) function matherr to specify error handling for these functions.


Returns
Normally, returns the calculated value. When x is zero, the returned value is -HUGE_VAL and errno is set to ERANGE. When x is negative, the returned value is -HUGE_VAL and errno is set to EDOM. You can control the error behavior via matherr.


Portability
log is ANSI, logf is an extension.



PREV UP NEXT Bookshelf

Packaging copyright © 1988-2000 OAR Corporation
Context copyright by each document's author. See Free Software Foundation for information.