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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [newlib/] [libm/] [common/] [s_exp10.c] - Blame information for rev 179

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
/* @(#)s_exp10.c 5.1 93/09/24 */
2
/* Modified from s_exp2.c by Yaakov Selkowitz 2007.  */
3
 
4
/*
5
 * ====================================================
6
 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
7
 *
8
 * Developed at SunPro, a Sun Microsystems, Inc. business.
9
 * Permission to use, copy, modify, and distribute this
10
 * software is freely granted, provided that this notice
11
 * is preserved.
12
 * ====================================================
13
 */
14
 
15
/*
16
FUNCTION
17
        <<exp10>>, <<exp10f>>---exponential
18
INDEX
19
        exp10
20
INDEX
21
        exp10f
22
 
23
ANSI_SYNOPSIS
24
        #include <math.h>
25
        double exp10(double <[x]>);
26
        float exp10f(float <[x]>);
27
 
28
TRAD_SYNOPSIS
29
        #include <math.h>
30
        double exp10(<[x]>);
31
        double <[x]>;
32
 
33
        float exp10f(<[x]>);
34
        float <[x]>;
35
 
36
DESCRIPTION
37
        <<exp10>> and <<exp10f>> calculate 10 ^ <[x]>, that is,
38
        @ifnottex
39
        10 raised to the power <[x]>.
40
        @end ifnottex
41
        @tex
42
        $10^x$
43
        @end tex
44
 
45
        You can use the (non-ANSI) function <<matherr>> to specify
46
        error handling for these functions.
47
 
48
RETURNS
49
        On success, <<exp10>> and <<exp10f>> return the calculated value.
50
        If the result underflows, the returned value is <<0>>.  If the
51
        result overflows, the returned value is <<HUGE_VAL>>.  In
52
        either case, <<errno>> is set to <<ERANGE>>.
53
 
54
PORTABILITY
55
        <<exp10>> and <<exp10f>> are GNU extensions.
56
 
57
*/
58
 
59
/*
60
 * wrapper exp10(x)
61
 */
62
 
63
#undef exp10
64
#include "fdlibm.h"
65
#include <errno.h>
66
#include <math.h>
67
 
68
#ifndef _DOUBLE_IS_32BITS
69
 
70
#ifdef __STDC__
71
        double exp10(double x)          /* wrapper exp10 */
72
#else
73
        double exp10(x)                 /* wrapper exp10 */
74
        double x;
75
#endif
76
{
77
  return pow(10.0, x);
78
}
79
 
80
#endif /* defined(_DOUBLE_IS_32BITS) */

powered by: WebSVN 2.1.0

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