OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [newlib/] [libm/] [mathfp/] [s_log10.c] - Blame information for rev 207

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
 
2
/* @(#)z_log10.c 1.0 98/08/13 */
3
/******************************************************************
4
 * Logarithm
5
 *
6
 * Input:
7
 *   x - floating point value
8
 *
9
 * Output:
10
 *   logarithm of x
11
 *
12
 * Description:
13
 *   This routine returns the logarithm of x (base 10).
14
 *
15
 *****************************************************************/
16
 
17
/*
18
FUNCTION
19
        <<log10>>, <<log10f>>---base 10 logarithms
20
 
21
INDEX
22
log10
23
INDEX
24
log10f
25
 
26
ANSI_SYNOPSIS
27
        #include <math.h>
28
        double log10(double <[x]>);
29
        float log10f(float <[x]>);
30
 
31
TRAD_SYNOPSIS
32
        #include <math.h>
33
        double log10(<[x]>)
34
        double <[x]>;
35
 
36
        float log10f(<[x]>)
37
        float <[x]>;
38
 
39
DESCRIPTION
40
<<log10>> returns the base 10 logarithm of <[x]>.
41
It is implemented as <<log(<[x]>) / log(10)>>.
42
 
43
<<log10f>> is identical, save that it takes and returns <<float>> values.
44
 
45
RETURNS
46
<<log10>> and <<log10f>> return the calculated value.
47
 
48
See the description of <<log>> for information on errors.
49
 
50
PORTABILITY
51
<<log10>> is ANSI C.  <<log10f>> is an extension.
52
 
53
*/
54
 
55
 
56
#include "fdlibm.h"
57
#include "zmath.h"
58
 
59
#ifndef _DOUBLE_IS_32BITS
60
 
61
double
62
_DEFUN (log10, (double),
63
        double x)
64
{
65
  return (logarithm (x, 1));
66
}
67
 
68
#endif /* _DOUBLE_IS_32BITS */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.