Guardian C Library Calls Reference Manual
Reference to Library Calls
Guardian TNS C Library Calls Reference Manual—128833 3-107
log10
log10
The log10 function computes the common (base 10) logarithm of its argument.
expr
is an expression of type double with a value greater than zero.
Return Value
is the base 10 logarithm of expr. If expr is less than or equal to zero, log10 returns
the value HUGE_VAL and sets errno to EDOM (a domain error).
Example
This example prints “The base 10 log of 256.000000 is 2.408240.”:
#include <mathh>
#include <stdioh>
int main(void)
{
double r, x;
x = 256.0;
r = log10(x);
printf("The base 10 log of %f is %f.", x, r);
}
#include <mathh>
double log10(double expr);