at_wini also needs a pci_reserve() for the pci compatability device, if
[minix3.git] / lib / math / log10.c
blob85e4296e2258b918d3de92f4af689cb3157a897d
1 /*
2 * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
3 * See the copyright notice in the ACK home directory, in the file "Copyright".
5 * Author: Ceriel J.H. Jacobs
6 */
7 /* $Header$ */
9 #include <math.h>
10 #include <errno.h>
11 #include "localmath.h"
13 double
14 log10(double x)
16 if (__IsNan(x)) {
17 errno = EDOM;
18 return x;
20 if (x < 0) {
21 errno = EDOM;
22 return -HUGE_VAL;
24 else if (x == 0) {
25 errno = ERANGE;
26 return -HUGE_VAL;
29 return log(x) / M_LN10;