GUI: Move .ui files from goffice resources to glib resources
[gnumeric.git] / src / numbers.h
blob629f06aed37fd13ba9011c07abafecf2820e8643
1 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 #ifndef _GNM_NUMBERS_H_
3 # define _GNM_NUMBERS_H_
5 #include <gnumeric-features.h>
6 #include <goffice/goffice.h>
8 G_BEGIN_DECLS
11 * WARNING: Any preprocessor conditionals in here must also be placed
12 * in gnumeric-features.h.in
15 #ifdef GNM_SUPPLIES_LGAMMA
16 GO_VAR_DECL int signgam;
17 double lgamma (double x);
18 #endif
20 #ifdef GNM_SUPPLIES_LGAMMA_R
21 double lgamma_r (double x, int *signp);
22 #endif
24 #ifdef GNM_WITH_LONG_DOUBLE
26 #ifdef GNM_SUPPLIES_ERFL
27 long double erfl (long double x);
28 #endif
30 #ifdef GNM_SUPPLIES_ERFCL
31 long double erfl (long double x);
32 #endif
34 typedef long double gnm_float;
36 #define gnm_abs fabsl
37 #define gnm_acos acosl
38 #define gnm_acosh acoshl
39 #define gnm_add_epsilon go_add_epsilonl
40 #define gnm_asin asinl
41 #define gnm_asinh asinhl
42 #define gnm_atan atanl
43 #define gnm_atan2 atan2l
44 #define gnm_atanpi go_atanpil
45 #define gnm_atan2pi go_atan2pil
46 #define gnm_atanh atanhl
47 #define gnm_ceil ceill
48 #define gnm_cosh coshl
49 #define gnm_cospi go_cospil
50 #define gnm_cotpi go_cotpil
51 #define gnm_erf erfl
52 #define gnm_erfc erfcl
53 #define gnm_exp expl
54 #define gnm_expm1 expm1l
55 #define gnm_fake_ceil go_fake_ceill
56 #define gnm_fake_floor go_fake_floorl
57 #define gnm_fake_round go_fake_roundl
58 #define gnm_fake_trunc go_fake_truncl
59 #define gnm_finite finitel
60 #define gnm_floor floorl
61 #define gnm_fmod fmodl
62 #define gnm_format_value go_format_valuel
63 #define gnm_format_value_gstring go_format_value_gstringl
64 #define gnm_frexp frexpl
65 #define gnm_hypot hypotl
66 #define gnm_isnan isnanl
67 #define gnm_jn jnl
68 #define gnm_ldexp ldexpl
69 #define gnm_lgamma lgammal
70 #define gnm_lgamma_r lgammal_r
71 #define gnm_log logl
72 #define gnm_log10 log10l
73 #define gnm_log1p log1pl
74 #define gnm_log2 log2l
75 #define gnm_modf modfl
76 #define gnm_nan go_nanl
77 #define gnm_ninf go_ninfl
78 #define gnm_pinf go_pinfl
79 #define gnm_pow powl
80 #define gnm_pow10 go_pow10l
81 #define gnm_pow2 go_pow2l
82 #define gnm_render_general go_render_generall
83 #define gnm_sinh sinhl
84 #define gnm_sinpi go_sinpil
85 #define gnm_sqrt sqrtl
86 #define gnm_strto go_strtold
87 #define gnm_sub_epsilon go_sub_epsilonl
88 #define gnm_tanh tanhl
89 #define gnm_tanpi go_tanpil
90 #ifndef GNM_REDUCES_TRIG_RANGE
91 #define gnm_sin sinl
92 #define gnm_cos cosl
93 #define gnm_tan tanl
94 #endif
95 #define gnm_yn ynl
97 #define GNM_FORMAT_e "Le"
98 #define GNM_FORMAT_E "LE"
99 #define GNM_FORMAT_f "Lf"
100 #define GNM_FORMAT_g "Lg"
101 #define GNM_FORMAT_G "LG"
102 #define GNM_SCANF_g "Lg"
103 #define GNM_DIG LDBL_DIG
104 #define GNM_MANT_DIG LDBL_MANT_DIG
105 #define GNM_MIN_EXP LDBL_MIN_EXP
106 #define GNM_MAX_EXP LDBL_MAX_EXP
107 #define GNM_MIN LDBL_MIN
108 #define GNM_MAX LDBL_MAX
109 #define GNM_EPSILON LDBL_EPSILON
110 #define GNM_const(_c) _c ## L
112 #define GnmQuad GOQuadl
113 #define gnm_quad_acos go_quad_acosl
114 #define gnm_quad_add go_quad_addl
115 #define gnm_quad_asin go_quad_asinl
116 #define gnm_quad_cos go_quad_cosl
117 #define gnm_quad_cospi go_quad_cospil
118 #define gnm_quad_div go_quad_divl
119 #define gnm_quad_e go_quad_el
120 #define gnm_quad_end go_quad_endl
121 #define gnm_quad_exp go_quad_expl
122 #define gnm_quad_expm1 go_quad_expm1l
123 #define gnm_quad_floor go_quad_floorl
124 #define gnm_quad_init go_quad_initl
125 #define gnm_quad_ln2 go_quad_ln2l
126 #define gnm_quad_log go_quad_logl
127 #define gnm_quad_mul go_quad_mull
128 #define gnm_quad_mul12 go_quad_mul12l
129 #define gnm_quad_one go_quad_onel
130 #define gnm_quad_pi go_quad_pil
131 #define gnm_quad_2pi go_quad_2pil
132 #define gnm_quad_pow go_quad_powl
133 #define gnm_quad_sin go_quad_sinl
134 #define gnm_quad_sinpi go_quad_sinpil
135 #define gnm_quad_sqrt go_quad_sqrtl
136 #define gnm_quad_sqrt2 go_quad_sqrt2l
137 #define gnm_quad_start go_quad_startl
138 #define gnm_quad_sub go_quad_subl
139 #define gnm_quad_value go_quad_valuel
140 #define gnm_quad_zero go_quad_zerol
141 #define GnmAccumulator GOAccumulatorl
142 #define gnm_accumulator_start go_accumulator_startl
143 #define gnm_accumulator_end go_accumulator_endl
144 #define gnm_accumulator_new go_accumulator_newl
145 #define gnm_accumulator_free go_accumulator_freel
146 #define gnm_accumulator_add go_accumulator_addl
147 #define gnm_accumulator_add_quad go_accumulator_add_quadl
148 #define gnm_accumulator_value go_accumulator_valuel
150 #else /* !GNM_WITH_LONG_DOUBLE */
152 typedef double gnm_float;
154 #define gnm_abs fabs
155 #define gnm_acos acos
156 #define gnm_acosh acosh
157 #define gnm_add_epsilon go_add_epsilon
158 #define gnm_asin asin
159 #define gnm_asinh asinh
160 #define gnm_atan atan
161 #define gnm_atan2 atan2
162 #define gnm_atanpi go_atanpi
163 #define gnm_atan2pi go_atan2pi
164 #define gnm_atanh atanh
165 #define gnm_ceil ceil
166 #define gnm_cosh cosh
167 #define gnm_cospi go_cospi
168 #define gnm_cotpi go_cotpi
169 #define gnm_erf erf
170 #define gnm_erfc erfc
171 #define gnm_exp exp
172 #define gnm_expm1 expm1
173 #define gnm_fake_ceil go_fake_ceil
174 #define gnm_fake_floor go_fake_floor
175 #define gnm_fake_round go_fake_round
176 #define gnm_fake_trunc go_fake_trunc
177 #define gnm_finite go_finite
178 #define gnm_floor floor
179 #define gnm_fmod fmod
180 #define gnm_format_value go_format_value
181 #define gnm_format_value_gstring go_format_value_gstring
182 #define gnm_frexp frexp
183 #define gnm_hypot hypot
184 #define gnm_isnan isnan
185 #define gnm_jn jn
186 #define gnm_ldexp ldexp
187 #define gnm_lgamma lgamma
188 #define gnm_lgamma_r lgamma_r
189 #define gnm_log log
190 #define gnm_log10 log10
191 #define gnm_log1p log1p
192 #define gnm_log2 log2
193 #define gnm_modf modf
194 #define gnm_nan go_nan
195 #define gnm_ninf go_ninf
196 #define gnm_pinf go_pinf
197 #define gnm_pow pow
198 #define gnm_pow10 go_pow10
199 #define gnm_pow2 go_pow2
200 #define gnm_render_general go_render_general
201 #define gnm_sinh sinh
202 #define gnm_sinpi go_sinpi
203 #define gnm_sqrt sqrt
204 #define gnm_strto go_strtod
205 #define gnm_sub_epsilon go_sub_epsilon
206 #define gnm_tanh tanh
207 #define gnm_tanpi go_tanpi
208 #ifndef GNM_REDUCES_TRIG_RANGE
209 #define gnm_sin sin
210 #define gnm_cos cos
211 #define gnm_tan tan
212 #endif
213 #define gnm_yn yn
215 #define GNM_FORMAT_e "e"
216 #define GNM_FORMAT_E "E"
217 #define GNM_FORMAT_f "f"
218 #define GNM_FORMAT_g "g"
219 #define GNM_FORMAT_G "G"
220 #define GNM_SCANF_g "lg"
221 #define GNM_DIG DBL_DIG
222 #define GNM_MANT_DIG DBL_MANT_DIG
223 #define GNM_MIN_EXP DBL_MIN_EXP
224 #define GNM_MAX_EXP DBL_MAX_EXP
225 #define GNM_MIN DBL_MIN
226 #define GNM_MAX DBL_MAX
227 #define GNM_EPSILON DBL_EPSILON
228 #define GNM_const(_c) _c
230 #define GnmQuad GOQuad
231 #define gnm_quad_acos go_quad_acos
232 #define gnm_quad_add go_quad_add
233 #define gnm_quad_asin go_quad_asin
234 #define gnm_quad_cos go_quad_cos
235 #define gnm_quad_cospi go_quad_cospi
236 #define gnm_quad_div go_quad_div
237 #define gnm_quad_e go_quad_e
238 #define gnm_quad_end go_quad_end
239 #define gnm_quad_exp go_quad_exp
240 #define gnm_quad_expm1 go_quad_expm1
241 #define gnm_quad_floor go_quad_floor
242 #define gnm_quad_init go_quad_init
243 #define gnm_quad_ln2 go_quad_ln2
244 #define gnm_quad_log go_quad_log
245 #define gnm_quad_mul go_quad_mul
246 #define gnm_quad_mul12 go_quad_mul12
247 #define gnm_quad_one go_quad_one
248 #define gnm_quad_pi go_quad_pi
249 #define gnm_quad_2pi go_quad_2pi
250 #define gnm_quad_pow go_quad_pow
251 #define gnm_quad_sin go_quad_sin
252 #define gnm_quad_sinpi go_quad_sinpi
253 #define gnm_quad_sqrt go_quad_sqrt
254 #define gnm_quad_sqrt2 go_quad_sqrt2
255 #define gnm_quad_start go_quad_start
256 #define gnm_quad_sub go_quad_sub
257 #define gnm_quad_value go_quad_value
258 #define gnm_quad_zero go_quad_zero
259 #define GnmAccumulator GOAccumulator
260 #define gnm_accumulator_start go_accumulator_start
261 #define gnm_accumulator_end go_accumulator_end
262 #define gnm_accumulator_new go_accumulator_new
263 #define gnm_accumulator_free go_accumulator_free
264 #define gnm_accumulator_add go_accumulator_add
265 #define gnm_accumulator_add_quad go_accumulator_add_quad
266 #define gnm_accumulator_value go_accumulator_value
268 #endif
270 #ifdef GNM_REDUCES_TRIG_RANGE
271 gnm_float gnm_sin (gnm_float x);
272 gnm_float gnm_cos (gnm_float x);
273 gnm_float gnm_tan (gnm_float x);
274 #endif
277 G_END_DECLS
279 #endif /* _GNM_NUMBERS_H_ */