xref: /illumos-gate/usr/src/lib/libm/common/C/libm_protos.h (revision 08855964b9970604433f7b19dcd71cf5af5e5f14)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
23  */
24 /*
25  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
26  * Use is subject to license terms.
27  */
28 
29 #ifndef _C_LIBM_PROTOS_H
30 #define	_C_LIBM_PROTOS_H
31 
32 /*
33  * Many symbols used to be namespaced with __libm to prevent collisions.  All
34  * but these two were otherwise scoped local and directly bound, so that
35  * collision could not occur.
36  *
37  * For reasons unknown, these two are global (but private).
38  */
39 #define	__rem_pio2	__libm__rem_pio2
40 #define	__rem_pio2m	__libm__rem_pio2m
41 
42 #ifndef _ASM
43 #ifdef __STDC__
44 #define	__P(p)	p
45 #else
46 #define	__P(p)	()
47 #endif
48 
49 #include <sys/ieeefp.h>
50 
51 extern double _SVID_libm_err __P((double, double, int));
52 extern double __k_cos __P((double, double));
53 extern double __k_cos_ __P((double *));
54 extern double __k_lgamma __P((double, int *));
55 extern double __k_sin __P((double, double));
56 extern double __k_sin_ __P((double *));
57 extern double __k_sincos __P((double, double, double *));
58 extern double __k_sincos_ __P((double *, double *));
59 extern double __k_tan __P((double, double, int));
60 extern double __k_cexp __P((double, int *));
61 extern long double __k_cexpl __P((long double, int *));
62 extern double __k_clog_r __P((double, double, double *));
63 extern long double __k_clog_rl __P((long double, long double, long double *));
64 extern double __k_atan2 __P((double, double, double *));
65 extern long double __k_atan2l __P((long double, long double, long double *));
66 extern int __rem_pio2 __P((double, double *));
67 extern int __rem_pio2m __P((double *, double *, int, int, int, const int *));
68 
69 /*
70  * entry points that are in-lined
71  */
72 extern double copysign __P((double, double));
73 extern int finite __P((double));
74 extern enum fp_class_type fp_class __P((double));
75 extern double infinity __P((void));
76 extern int isinf __P((double));
77 extern int signbit __P((double));
78 
79 /*
80  * new C99 entry points
81  */
82 extern double fdim __P((double, double));
83 extern double fma __P((double, double, double));
84 extern double fmax __P((double, double));
85 extern double fmin __P((double, double));
86 extern double frexp __P((double, int *));
87 extern double ldexp __P((double, int));
88 extern double modf __P((double, double *));
89 extern double nan __P((const char *));
90 extern double nearbyint __P((double));
91 extern double nexttoward __P((double, long double));
92 extern double remquo __P((double, double, int *));
93 extern double round __P((double));
94 extern double scalbln __P((double, long int));
95 extern double tgamma __P((double));
96 extern double trunc __P((double));
97 extern float fdimf __P((float, float));
98 extern float fmaf __P((float, float, float));
99 extern float fmaxf __P((float, float));
100 extern float fminf __P((float, float));
101 extern float frexpf __P((float, int *));
102 extern float ldexpf __P((float, int));
103 extern float modff __P((float, float *));
104 extern float nanf __P((const char *));
105 extern float nearbyintf __P((float));
106 extern float nextafterf __P((float, float));
107 extern float nexttowardf __P((float, long double));
108 extern float remquof __P((float, float, int *));
109 extern float roundf __P((float));
110 extern float scalblnf __P((float, long int));
111 extern float tgammaf __P((float));
112 extern float truncf __P((float));
113 extern long double frexpl(long double, int *);
114 extern long double fdiml __P((long double, long double));
115 extern long double fmal __P((long double, long double, long double));
116 extern long double fmaxl __P((long double, long double));
117 extern long double fminl __P((long double, long double));
118 extern long double ldexpl __P((long double, int));
119 extern long double modfl __P((long double, long double *));
120 extern long double nanl __P((const char *));
121 extern long double nearbyintl __P((long double));
122 extern long double nextafterl __P((long double, long double));
123 extern long double nexttowardl __P((long double, long double));
124 extern long double remquol __P((long double, long double, int *));
125 extern long double roundl __P((long double));
126 extern long double scalblnl __P((long double, long int));
127 extern long double tgammal __P((long double));
128 extern long double truncl __P((long double));
129 extern long int lrint __P((double));
130 extern long int lrintf __P((float));
131 extern long int lrintl __P((long double));
132 extern long int lround __P((double));
133 extern long int lroundf __P((float));
134 extern long int lroundl __P((long double));
135 extern long long int llrint __P((double));
136 extern long long int llrintf __P((float));
137 extern long long int llrintl __P((long double));
138 extern long long int llround __P((double));
139 extern long long int llroundf __P((float));
140 extern long long int llroundl __P((long double));
141 #endif	/* _ASM */
142 
143 #endif	/* _C_LIBM_PROTOS_H */
144