repo.or.cz
/
minix3.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
at_wini also needs a pci_reserve() for the pci compatability device, if
[minix3.git]
/
lib
/
math
/
log10.c
blob
85e4296e2258b918d3de92f4af689cb3157a897d
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".
4
*
5
* Author: Ceriel J.H. Jacobs
6
*/
7
/* $Header$ */
8
9
#include <math.h>
10
#include <errno.h>
11
#include
"localmath.h"
12
13
double
14
log10
(
double
x
)
15
{
16
if
(
__IsNan
(
x
)) {
17
errno
=
EDOM
;
18
return
x
;
19
}
20
if
(
x
<
0
) {
21
errno
=
EDOM
;
22
return
-
HUGE_VAL
;
23
}
24
else if
(
x
==
0
) {
25
errno
=
ERANGE
;
26
return
-
HUGE_VAL
;
27
}
28
29
return
log
(
x
) /
M_LN10
;
30
}