File Coverage

lib/PDL/Math.xs
Criterion Covered Total %
statement 109 135 80.7
branch 359 1196 30.0
condition n/a
subroutine n/a
pod n/a
total 468 1331 35.1


line stmt bran cond sub pod time code
1              
2             #line 453 "lib/PDL/PP.pm"
3             /*
4             * THIS FILE WAS GENERATED BY PDL::PP from lib/PDL/Math.pd! Do not modify!
5             */
6              
7             #define PDL_FREE_CODE(trans, destroy, comp_free_code, ntpriv_free_code) \
8             if (destroy) { \
9             comp_free_code \
10             } \
11             if ((trans)->dims_redone) { \
12             ntpriv_free_code \
13             }
14              
15             #include "EXTERN.h"
16             #include "perl.h"
17             #include "XSUB.h"
18             #include "pdl.h"
19             #include "pdlcore.h"
20             #define PDL PDL_Math
21             extern Core* PDL; /* Structure hold core C functions */
22             #line 23 "lib/PDL/Math.xs"
23              
24             #include
25             #include "protos.h"
26             #include "cpoly.h"
27             pdl_error pdl_run_acos(pdl *a,pdl *b);
28             pdl_error pdl_run_asin(pdl *a,pdl *b);
29             pdl_error pdl_run_atan(pdl *a,pdl *b);
30             pdl_error pdl_run_cosh(pdl *a,pdl *b);
31             pdl_error pdl_run_sinh(pdl *a,pdl *b);
32             pdl_error pdl_run_tan(pdl *a,pdl *b);
33             pdl_error pdl_run_tanh(pdl *a,pdl *b);
34             pdl_error pdl_run_ceil(pdl *a,pdl *b);
35             pdl_error pdl_run_floor(pdl *a,pdl *b);
36             pdl_error pdl_run_rint(pdl *a,pdl *b);
37             pdl_error pdl_run_pow(pdl *a,pdl *b,pdl *c);
38             pdl_error pdl_run_acosh(pdl *a,pdl *b);
39             pdl_error pdl_run_asinh(pdl *a,pdl *b);
40             pdl_error pdl_run_atanh(pdl *a,pdl *b);
41             pdl_error pdl_run_erf(pdl *a,pdl *b);
42             pdl_error pdl_run_erfc(pdl *a,pdl *b);
43             pdl_error pdl_run_bessj0(pdl *a,pdl *b);
44             pdl_error pdl_run_bessj1(pdl *a,pdl *b);
45             pdl_error pdl_run_bessy0(pdl *a,pdl *b);
46             pdl_error pdl_run_bessy1(pdl *a,pdl *b);
47             pdl_error pdl_run_bessjn(pdl *a,pdl *n,pdl *b);
48             pdl_error pdl_run_bessyn(pdl *a,pdl *n,pdl *b);
49             pdl_error pdl_run_lgamma(pdl *a,pdl *b,pdl *s);
50             pdl_error pdl_run_isfinite(pdl *a,pdl *mask);
51             pdl_error pdl_run_erfi(pdl *a,pdl *b);
52             pdl_error pdl_run_ndtri(pdl *a,pdl *b);
53             pdl_error pdl_run_polyroots(pdl *cr,pdl *ci,pdl *rr,pdl *ri);
54             pdl_error pdl_run_polyfromroots(pdl *r,pdl *c);
55             pdl_error pdl_run_polyval(pdl *c,pdl *x,pdl *y);
56             pdl_error pdl_run_csqrt(pdl *i,pdl *o);
57             pdl_error pdl_run_clog(pdl *i,pdl *o);
58             pdl_error pdl_run_cacos(pdl *i,pdl *o);
59             pdl_error pdl_run_casin(pdl *i,pdl *o);
60             pdl_error pdl_run_cacosh(pdl *i,pdl *o);
61             pdl_error pdl_run_catanh(pdl *i,pdl *o);
62             pdl_error pdl_run_csqrt_up(pdl *i,pdl *o);
63              
64             #line 449 "lib/PDL/PP.pm"
65             #include "pdlperl.h"
66             #line 67 "lib/PDL/Math.xs"
67              
68             Core* PDL = NULL; /* Structure hold core C functions */
69              
70             MODULE = PDL::Math PACKAGE = PDL PREFIX=pdl_run_
71              
72             PROTOTYPES: DISABLE
73              
74              
75             void
76             pdl_run_acos(a, b=b)
77             SV *b_SV = items > 1 ? ST(1) : NULL;
78             PREINIT:
79 1 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
80             INPUT:
81             pdl *a
82             pdl *b=NO_INIT
83             PPCODE:
84 1 50         PDL_XS_INPLACE(a, b)
    0          
    50          
    50          
85 1           PDL->barf_if_error(pdl_run_acos(a,b));
86 1 50         PDL_XS_RETURN(ST(0) = b_SV)
    50          
    50          
    50          
    0          
87              
88             void
89             pdl_run_asin(a, b=b)
90             SV *b_SV = items > 1 ? ST(1) : NULL;
91             PREINIT:
92 8 100         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
93             INPUT:
94             pdl *a
95             pdl *b=NO_INIT
96             PPCODE:
97 8 50         PDL_XS_INPLACE(a, b)
    0          
    50          
    100          
98 8           PDL->barf_if_error(pdl_run_asin(a,b));
99 8 50         PDL_XS_RETURN(ST(0) = b_SV)
    50          
    50          
    50          
    0          
100              
101             void
102             pdl_run_atan(a, b=b)
103             SV *b_SV = items > 1 ? ST(1) : NULL;
104             PREINIT:
105 1 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
106             INPUT:
107             pdl *a
108             pdl *b=NO_INIT
109             PPCODE:
110 1 50         PDL_XS_INPLACE(a, b)
    0          
    50          
    50          
111 1           PDL->barf_if_error(pdl_run_atan(a,b));
112 1 50         PDL_XS_RETURN(ST(0) = b_SV)
    50          
    50          
    50          
    0          
113              
114             void
115             pdl_run_cosh(a, b=b)
116             SV *b_SV = items > 1 ? ST(1) : NULL;
117             PREINIT:
118 1 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
119             INPUT:
120             pdl *a
121             pdl *b=NO_INIT
122             PPCODE:
123 1 50         PDL_XS_INPLACE(a, b)
    0          
    50          
    50          
124 1           PDL->barf_if_error(pdl_run_cosh(a,b));
125 1 50         PDL_XS_RETURN(ST(0) = b_SV)
    50          
    50          
    50          
    0          
126              
127             void
128             pdl_run_sinh(a, b=b)
129             SV *b_SV = items > 1 ? ST(1) : NULL;
130             PREINIT:
131 2 100         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
132             INPUT:
133             pdl *a
134             pdl *b=NO_INIT
135             PPCODE:
136 2 100         PDL_XS_INPLACE(a, b)
    50          
    50          
    50          
137 2           PDL->barf_if_error(pdl_run_sinh(a,b));
138 2 50         PDL_XS_RETURN(ST(0) = b_SV)
    50          
    50          
    50          
    0          
139              
140             void
141             pdl_run_tan(a, b=b)
142             SV *b_SV = items > 1 ? ST(1) : NULL;
143             PREINIT:
144 0 0         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
145             INPUT:
146             pdl *a
147             pdl *b=NO_INIT
148             PPCODE:
149 0 0         PDL_XS_INPLACE(a, b)
    0          
    0          
    0          
150 0           PDL->barf_if_error(pdl_run_tan(a,b));
151 0 0         PDL_XS_RETURN(ST(0) = b_SV)
    0          
    0          
    0          
    0          
152              
153             void
154             pdl_run_tanh(a, b=b)
155             SV *b_SV = items > 1 ? ST(1) : NULL;
156             PREINIT:
157 1 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
158             INPUT:
159             pdl *a
160             pdl *b=NO_INIT
161             PPCODE:
162 1 50         PDL_XS_INPLACE(a, b)
    0          
    50          
    50          
163 1           PDL->barf_if_error(pdl_run_tanh(a,b));
164 1 50         PDL_XS_RETURN(ST(0) = b_SV)
    50          
    50          
    50          
    0          
165              
166             void
167             pdl_run_ceil(a, b=b)
168             SV *b_SV = items > 1 ? ST(1) : NULL;
169             PREINIT:
170 20 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
171             INPUT:
172             pdl *a
173             pdl *b=NO_INIT
174             PPCODE:
175 20 50         PDL_XS_INPLACE(a, b)
    0          
    50          
    50          
176 20           PDL->barf_if_error(pdl_run_ceil(a,b));
177 20 50         PDL_XS_RETURN(ST(0) = b_SV)
    50          
    50          
    50          
    0          
178              
179             void
180             pdl_run_floor(a, b=b)
181             SV *b_SV = items > 1 ? ST(1) : NULL;
182             PREINIT:
183 36 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
184             INPUT:
185             pdl *a
186             pdl *b=NO_INIT
187             PPCODE:
188 36 50         PDL_XS_INPLACE(a, b)
    0          
    50          
    50          
189 36           PDL->barf_if_error(pdl_run_floor(a,b));
190 36 50         PDL_XS_RETURN(ST(0) = b_SV)
    50          
    50          
    50          
    0          
191              
192             void
193             pdl_run_rint(a, b=b)
194             SV *b_SV = items > 1 ? ST(1) : NULL;
195             PREINIT:
196 7 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
197             INPUT:
198             pdl *a
199             pdl *b=NO_INIT
200             PPCODE:
201 7 50         PDL_XS_INPLACE(a, b)
    0          
    50          
    50          
202 7           PDL->barf_if_error(pdl_run_rint(a,b));
203 7 50         PDL_XS_RETURN(ST(0) = b_SV)
    50          
    50          
    50          
    0          
204              
205             void
206             pdl_run_pow(a, b, c=c)
207             SV *c_SV = items > 2 ? ST(2) : NULL;
208             PREINIT:
209 2 100         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
210             INPUT:
211             pdl *a
212             pdl *b
213             pdl *c=NO_INIT
214             PPCODE:
215 2 50         PDL_XS_INPLACE(a, c)
    0          
    50          
    100          
216 2           PDL->barf_if_error(pdl_run_pow(a,b,c));
217 2 50         PDL_XS_RETURN(ST(0) = c_SV)
    50          
    50          
    50          
    0          
218              
219             void
220             pdl_run_acosh(a, b=b)
221             SV *b_SV = items > 1 ? ST(1) : NULL;
222             PREINIT:
223 2 100         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
224             INPUT:
225             pdl *a
226             pdl *b=NO_INIT
227             PPCODE:
228 2 50         PDL_XS_INPLACE(a, b)
    0          
    100          
    50          
229 2           PDL->barf_if_error(pdl_run_acosh(a,b));
230 2 100         PDL_XS_RETURN(ST(0) = b_SV)
    50          
    50          
    50          
    50          
231              
232             void
233             pdl_run_asinh(a, b=b)
234             SV *b_SV = items > 1 ? ST(1) : NULL;
235             PREINIT:
236 0 0         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
237             INPUT:
238             pdl *a
239             pdl *b=NO_INIT
240             PPCODE:
241 0 0         PDL_XS_INPLACE(a, b)
    0          
    0          
    0          
242 0           PDL->barf_if_error(pdl_run_asinh(a,b));
243 0 0         PDL_XS_RETURN(ST(0) = b_SV)
    0          
    0          
    0          
    0          
244              
245             void
246             pdl_run_atanh(a, b=b)
247             SV *b_SV = items > 1 ? ST(1) : NULL;
248             PREINIT:
249 0 0         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
250             INPUT:
251             pdl *a
252             pdl *b=NO_INIT
253             PPCODE:
254 0 0         PDL_XS_INPLACE(a, b)
    0          
    0          
    0          
255 0           PDL->barf_if_error(pdl_run_atanh(a,b));
256 0 0         PDL_XS_RETURN(ST(0) = b_SV)
    0          
    0          
    0          
    0          
257              
258             void
259             pdl_run_erf(a, b=b)
260             SV *b_SV = items > 1 ? ST(1) : NULL;
261             PREINIT:
262 7 100         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
263             INPUT:
264             pdl *a
265             pdl *b=NO_INIT
266             PPCODE:
267 7 100         PDL_XS_INPLACE(a, b)
    50          
    50          
    100          
268 7           PDL->barf_if_error(pdl_run_erf(a,b));
269 7 50         PDL_XS_RETURN(ST(0) = b_SV)
    50          
    50          
    50          
    0          
270              
271             void
272             pdl_run_erfc(a, b=b)
273             SV *b_SV = items > 1 ? ST(1) : NULL;
274             PREINIT:
275 2 100         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
276             INPUT:
277             pdl *a
278             pdl *b=NO_INIT
279             PPCODE:
280 2 100         PDL_XS_INPLACE(a, b)
    50          
    50          
    50          
281 2           PDL->barf_if_error(pdl_run_erfc(a,b));
282 2 50         PDL_XS_RETURN(ST(0) = b_SV)
    50          
    50          
    50          
    0          
283              
284             void
285             pdl_run_bessj0(a, b=b)
286             SV *b_SV = items > 1 ? ST(1) : NULL;
287             PREINIT:
288 5 100         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
289             INPUT:
290             pdl *a
291             pdl *b=NO_INIT
292             PPCODE:
293 5 100         PDL_XS_INPLACE(a, b)
    100          
    50          
    100          
294 4           PDL->barf_if_error(pdl_run_bessj0(a,b));
295 4 50         PDL_XS_RETURN(ST(0) = b_SV)
    50          
    50          
    50          
    0          
296              
297             void
298             pdl_run_bessj1(a, b=b)
299             SV *b_SV = items > 1 ? ST(1) : NULL;
300             PREINIT:
301 2 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
302             INPUT:
303             pdl *a
304             pdl *b=NO_INIT
305             PPCODE:
306 2 50         PDL_XS_INPLACE(a, b)
    0          
    50          
    50          
307 2           PDL->barf_if_error(pdl_run_bessj1(a,b));
308 2 50         PDL_XS_RETURN(ST(0) = b_SV)
    50          
    50          
    50          
    0          
309              
310             void
311             pdl_run_bessy0(a, b=b)
312             SV *b_SV = items > 1 ? ST(1) : NULL;
313             PREINIT:
314 0 0         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
315             INPUT:
316             pdl *a
317             pdl *b=NO_INIT
318             PPCODE:
319 0 0         PDL_XS_INPLACE(a, b)
    0          
    0          
    0          
320 0           PDL->barf_if_error(pdl_run_bessy0(a,b));
321 0 0         PDL_XS_RETURN(ST(0) = b_SV)
    0          
    0          
    0          
    0          
322              
323             void
324             pdl_run_bessy1(a, b=b)
325             SV *b_SV = items > 1 ? ST(1) : NULL;
326             PREINIT:
327 0 0         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
328             INPUT:
329             pdl *a
330             pdl *b=NO_INIT
331             PPCODE:
332 0 0         PDL_XS_INPLACE(a, b)
    0          
    0          
    0          
333 0           PDL->barf_if_error(pdl_run_bessy1(a,b));
334 0 0         PDL_XS_RETURN(ST(0) = b_SV)
    0          
    0          
    0          
    0          
335              
336             void
337             pdl_run_bessjn(a, n, b=b)
338             SV *b_SV = items > 2 ? ST(2) : NULL;
339             PREINIT:
340 2 100         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
341             INPUT:
342             pdl *a
343             pdl *n
344             pdl *b=NO_INIT
345             PPCODE:
346 2 50         PDL_XS_INPLACE(a, b)
    0          
    50          
    100          
347 2           PDL->barf_if_error(pdl_run_bessjn(a,n,b));
348 2 50         PDL_XS_RETURN(ST(0) = b_SV)
    50          
    50          
    50          
    0          
349              
350             void
351             pdl_run_bessyn(a, n, b=b)
352             SV *b_SV = items > 2 ? ST(2) : NULL;
353             PREINIT:
354 2 100         PDL_XS_PREAMBLE((items == 3) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
355             INPUT:
356             pdl *a
357             pdl *n
358             pdl *b=NO_INIT
359             PPCODE:
360 2 100         PDL_XS_INPLACE(a, b)
    50          
    50          
    50          
361 2           PDL->barf_if_error(pdl_run_bessyn(a,n,b));
362 2 50         PDL_XS_RETURN(ST(0) = b_SV)
    50          
    50          
    50          
    0          
363              
364             void
365             pdl_run_lgamma(a, b=PDL_XS_PERLINIT_initsv(b_SV), s=PDL_XS_PERLINIT_initsv(s_SV))
366             SV *b_SV = items > 1 ? ST(1) : NULL;
367             SV *s_SV = items > 2 ? ST(2) : NULL;
368             PREINIT:
369 3 50         PDL_XS_PREAMBLE((items == 3) ? 0 : 2);
    100          
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
370             INPUT:
371             pdl *a
372             pdl *b
373             pdl *s
374             PPCODE:
375 3           PDL->barf_if_error(pdl_run_lgamma(a,b,s));
376 3 50         PDL_XS_RETURN(ST(0) = b_SV;ST(1) = s_SV)
    50          
    50          
    50          
    0          
377              
378             void
379             pdl_run_isfinite(a, mask=PDL_XS_PERLINIT_initsv(mask_SV))
380             SV *mask_SV = items > 1 ? ST(1) : NULL;
381             PREINIT:
382 89 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
383             INPUT:
384             pdl *a
385             pdl *mask
386             PPCODE:
387 89           PDL->barf_if_error(pdl_run_isfinite(a,mask));
388 89 50         PDL_XS_RETURN(ST(0) = mask_SV)
    50          
    50          
    50          
    0          
389              
390             void
391             pdl_run_erfi(a, b=b)
392             SV *b_SV = items > 1 ? ST(1) : NULL;
393             PREINIT:
394 5 100         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
395             INPUT:
396             pdl *a
397             pdl *b=NO_INIT
398             PPCODE:
399 5 100         PDL_XS_INPLACE(a, b)
    50          
    50          
    100          
400 5           PDL->barf_if_error(pdl_run_erfi(a,b));
401 5 50         PDL_XS_RETURN(ST(0) = b_SV)
    50          
    50          
    50          
    0          
402              
403             void
404             pdl_run_ndtri(a, b=b)
405             SV *b_SV = items > 1 ? ST(1) : NULL;
406             PREINIT:
407 2 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
408             INPUT:
409             pdl *a
410             pdl *b=NO_INIT
411             PPCODE:
412 2 50         PDL_XS_INPLACE(a, b)
    0          
    50          
    50          
413 2           PDL->barf_if_error(pdl_run_ndtri(a,b));
414 2 50         PDL_XS_RETURN(ST(0) = b_SV)
    50          
    50          
    50          
    0          
415              
416             void
417             _polyroots_int(cr,ci,rr,ri)
418             pdl *cr
419             pdl *ci
420             pdl *rr
421             pdl *ri
422             CODE:
423 16           PDL->barf_if_error(pdl_run_polyroots(cr,ci,rr,ri));
424              
425             void
426             _polyfromroots_int(r,c)
427             pdl *r
428             pdl *c
429             CODE:
430 4           PDL->barf_if_error(pdl_run_polyfromroots(r,c));
431              
432             void
433             _polyval_int(c,x,y)
434             pdl *c
435             pdl *x
436             pdl *y
437             CODE:
438 4           PDL->barf_if_error(pdl_run_polyval(c,x,y));
439              
440             void
441             pdl_run_csqrt(i, o=PDL_XS_PERLINIT_initsv(o_SV))
442             SV *o_SV = items > 1 ? ST(1) : NULL;
443             PREINIT:
444 11 100         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
445             INPUT:
446             pdl *i
447             pdl *o
448             PPCODE:
449 11           PDL->barf_if_error(pdl_run_csqrt(i,o));
450 11 50         PDL_XS_RETURN(ST(0) = o_SV)
    50          
    50          
    50          
    0          
451              
452             void
453             pdl_run_clog(i, o=PDL_XS_PERLINIT_initsv(o_SV))
454             SV *o_SV = items > 1 ? ST(1) : NULL;
455             PREINIT:
456 1 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
457             INPUT:
458             pdl *i
459             pdl *o
460             PPCODE:
461 1           PDL->barf_if_error(pdl_run_clog(i,o));
462 1 50         PDL_XS_RETURN(ST(0) = o_SV)
    50          
    50          
    50          
    0          
463              
464             void
465             pdl_run_cacos(i, o=PDL_XS_PERLINIT_initsv(o_SV))
466             SV *o_SV = items > 1 ? ST(1) : NULL;
467             PREINIT:
468 1 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
469             INPUT:
470             pdl *i
471             pdl *o
472             PPCODE:
473 1           PDL->barf_if_error(pdl_run_cacos(i,o));
474 1 50         PDL_XS_RETURN(ST(0) = o_SV)
    50          
    50          
    50          
    0          
475              
476             void
477             pdl_run_casin(i, o=PDL_XS_PERLINIT_initsv(o_SV))
478             SV *o_SV = items > 1 ? ST(1) : NULL;
479             PREINIT:
480 1 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
481             INPUT:
482             pdl *i
483             pdl *o
484             PPCODE:
485 1           PDL->barf_if_error(pdl_run_casin(i,o));
486 1 50         PDL_XS_RETURN(ST(0) = o_SV)
    50          
    50          
    50          
    0          
487              
488             void
489             pdl_run_cacosh(i, o=PDL_XS_PERLINIT_initsv(o_SV))
490             SV *o_SV = items > 1 ? ST(1) : NULL;
491             PREINIT:
492 1 50         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
493             INPUT:
494             pdl *i
495             pdl *o
496             PPCODE:
497 1           PDL->barf_if_error(pdl_run_cacosh(i,o));
498 1 50         PDL_XS_RETURN(ST(0) = o_SV)
    50          
    50          
    50          
    0          
499              
500             void
501             pdl_run_catanh(i, o=PDL_XS_PERLINIT_initsv(o_SV))
502             SV *o_SV = items > 1 ? ST(1) : NULL;
503             PREINIT:
504 0 0         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
505             INPUT:
506             pdl *i
507             pdl *o
508             PPCODE:
509 0           PDL->barf_if_error(pdl_run_catanh(i,o));
510 0 0         PDL_XS_RETURN(ST(0) = o_SV)
    0          
    0          
    0          
    0          
511              
512             void
513             pdl_run_csqrt_up(i, o=PDL_XS_PERLINIT_initsv(o_SV))
514             SV *o_SV = items > 1 ? ST(1) : NULL;
515             PREINIT:
516 11 100         PDL_XS_PREAMBLE((items == 2) ? 0 : 1);
    50          
    0          
    50          
    50          
    50          
    50          
    0          
    50          
    50          
517             INPUT:
518             pdl *i
519             pdl *o
520             PPCODE:
521 11           PDL->barf_if_error(pdl_run_csqrt_up(i,o));
522 11 50         PDL_XS_RETURN(ST(0) = o_SV)
    50          
    50          
    50          
    0          
523              
524              
525             #line 483 "lib/PDL/PP.pm"
526             BOOT:
527             /* Get pointer to structure of core shared C routines */
528             /* make sure PDL::Core is loaded */
529             #line 530 "lib/PDL/Math.xs"
530 71           perl_require_pv ("PDL/Core.pm"); /* make sure PDL::Core is loaded */
531             #ifndef aTHX_
532             #define aTHX_
533             #endif
534 71 50         if (SvTRUE (ERRSV)) Perl_croak(aTHX_ "%s",SvPV_nolen (ERRSV));
    50          
    0          
535 71           SV* CoreSV = perl_get_sv("PDL::SHARE",FALSE); /* var with core structure */
536 71 50         if (!CoreSV)
537 0           Perl_croak(aTHX_ "We require the PDL::Core module, which was not found");
538 71 50         if (!(PDL = INT2PTR(Core*,SvIV( CoreSV )))) /* Core* value */
539 0           Perl_croak(aTHX_ "Got NULL pointer for PDL");
540 71 50         if (PDL->Version != PDL_CORE_VERSION)
541 0           Perl_croak(aTHX_ "[PDL->Version: %ld PDL_CORE_VERSION: %ld XS_VERSION: %s] PDL::Math needs to be recompiled against the newly installed PDL", (long int)PDL->Version, (long int)PDL_CORE_VERSION, XS_VERSION);