line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
#ifdef __MINGW32__ |
3
|
|
|
|
|
|
|
#ifndef __USE_MINGW_ANSI_STDIO |
4
|
|
|
|
|
|
|
#define __USE_MINGW_ANSI_STDIO 1 |
5
|
|
|
|
|
|
|
#endif |
6
|
|
|
|
|
|
|
#endif |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#define PERL_NO_GET_CONTEXT 1 |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
#include "EXTERN.h" |
11
|
|
|
|
|
|
|
#include "perl.h" |
12
|
|
|
|
|
|
|
#include "XSUB.h" |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
#include "math_complex_c_q_include.h" |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
int _MATH_COMPLEX_C_Q_DIGITS = 36; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
#if defined(__MINGW32__) && !defined(__MINGW64__) |
20
|
|
|
|
|
|
|
typedef __float128 float128 __attribute__ ((aligned(32))); |
21
|
|
|
|
|
|
|
typedef __complex128 complex128 __attribute__ ((aligned(32))); |
22
|
|
|
|
|
|
|
#elif defined(__MINGW64__) || (defined(DEBUGGING) && defined(NV_IS_DOUBLE)) |
23
|
|
|
|
|
|
|
typedef __float128 float128 __attribute__ ((aligned(8))); |
24
|
|
|
|
|
|
|
typedef __complex128 complex128 __attribute__ ((aligned(8))); |
25
|
|
|
|
|
|
|
#else |
26
|
|
|
|
|
|
|
typedef __float128 float128; |
27
|
|
|
|
|
|
|
typedef __complex128 complex128; |
28
|
|
|
|
|
|
|
#endif |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
#if defined(__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR < 4 /* mingw-w64 compiler - this condition needs tweaking */ |
31
|
|
|
|
|
|
|
#define MINGW_W64_BUGGY 1 |
32
|
|
|
|
|
|
|
#elif defined(__MINGW32__) && !defined(NO_GCC_TAN_BUG) |
33
|
|
|
|
|
|
|
#ifndef GCC_TAN_BUG |
34
|
|
|
|
|
|
|
#define GCC_TAN_BUG 1 |
35
|
|
|
|
|
|
|
#endif |
36
|
|
|
|
|
|
|
#endif |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
int nnum = 0; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
#define MATH_COMPLEX complex128 |
41
|
|
|
|
|
|
|
|
42
|
2
|
|
|
|
|
|
void q_set_prec(int x) { |
43
|
2
|
50
|
|
|
|
|
if(x < 1)croak("1st arg (precision) to q_set_prec must be at least 1"); |
44
|
2
|
|
|
|
|
|
_MATH_COMPLEX_C_Q_DIGITS = x; |
45
|
2
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
8
|
|
|
|
|
|
int q_get_prec(void) { |
48
|
8
|
|
|
|
|
|
return _MATH_COMPLEX_C_Q_DIGITS; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
74
|
|
|
|
|
|
int _is_nan(float128 x) { |
52
|
74
|
100
|
|
|
|
|
if(x == x) return 0; |
53
|
36
|
|
|
|
|
|
return 1; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
32
|
|
|
|
|
|
int _is_inf(float128 x) { |
57
|
32
|
50
|
|
|
|
|
if(x == 0) return 0; |
58
|
32
|
100
|
|
|
|
|
if(_is_nan(x)) return 0; |
59
|
20
|
100
|
|
|
|
|
if(x / x == x / x) return 0; |
60
|
8
|
100
|
|
|
|
|
if(x < 0) return -1; |
61
|
4
|
|
|
|
|
|
return 1; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
152
|
|
|
|
|
|
float128 _get_nan(void) { |
65
|
152
|
|
|
|
|
|
float nanval = 0.0Q / 0.0Q; |
66
|
152
|
|
|
|
|
|
return nanval; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
2
|
|
|
|
|
|
float128 _get_inf(void) { |
70
|
2
|
|
|
|
|
|
float128 infval = 1.0Q / 0.0Q; |
71
|
2
|
|
|
|
|
|
return infval; |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
0
|
|
|
|
|
|
float128 _get_neg_inf(void) { |
75
|
0
|
|
|
|
|
|
float128 inf = -1.0Q / 0.0Q; |
76
|
0
|
|
|
|
|
|
return inf; |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
2
|
|
|
|
|
|
int is_nanq(pTHX_ SV * a) { |
80
|
2
|
50
|
|
|
|
|
if(SvNV(a) == SvNV(a)) return 0; |
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
81
|
1
|
|
|
|
|
|
return 1; |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
6
|
|
|
|
|
|
int is_infq(pTHX_ SV * a) { |
85
|
6
|
50
|
|
|
|
|
if(SvNV(a) == 0) return 0; |
|
|
50
|
|
|
|
|
|
86
|
6
|
50
|
|
|
|
|
if(SvNV(a) != SvNV(a)) return 0; |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
87
|
6
|
50
|
|
|
|
|
if(SvNV(a) / SvNV(a) == SvNV(a) / SvNV(a)) return 0; |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
88
|
6
|
50
|
|
|
|
|
if(SvNV(a) < 0) return -1; |
|
|
50
|
|
|
|
|
|
89
|
6
|
|
|
|
|
|
return 1; |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
74
|
|
|
|
|
|
SV * create_cq(pTHX) { |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
MATH_COMPLEX *pc; |
95
|
|
|
|
|
|
|
SV * obj_ref, * obj; |
96
|
|
|
|
|
|
|
|
97
|
74
|
|
|
|
|
|
New(42, pc, 1, MATH_COMPLEX); |
98
|
74
|
50
|
|
|
|
|
if(pc == NULL) croak("Failed to allocate memory in create_cq function"); |
99
|
|
|
|
|
|
|
|
100
|
74
|
|
|
|
|
|
obj_ref = newSV(0); |
101
|
74
|
|
|
|
|
|
obj = newSVrv(obj_ref, "Math::Complex_C::Q"); |
102
|
|
|
|
|
|
|
|
103
|
74
|
|
|
|
|
|
__real__ *pc = _get_nan(); |
104
|
74
|
|
|
|
|
|
__imag__ *pc = _get_nan(); |
105
|
|
|
|
|
|
|
|
106
|
74
|
|
|
|
|
|
sv_setiv(obj, INT2PTR(IV,pc)); |
107
|
74
|
|
|
|
|
|
SvREADONLY_on(obj); |
108
|
74
|
|
|
|
|
|
return obj_ref; |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
77
|
|
|
|
|
|
void assign_cq(pTHX_ SV * rop, SV * d1, SV * d2) { |
113
|
|
|
|
|
|
|
float128 _d1, _d2; |
114
|
|
|
|
|
|
|
|
115
|
77
|
50
|
|
|
|
|
if(SvUOK(d1)) { |
116
|
0
|
|
|
|
|
|
_d1 = (float128)SvUVX(d1); |
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
else { |
119
|
77
|
100
|
|
|
|
|
if(SvIOK(d1)) { |
120
|
36
|
|
|
|
|
|
_d1 = (float128)SvIVX(d1); |
121
|
|
|
|
|
|
|
} |
122
|
|
|
|
|
|
|
else { |
123
|
41
|
100
|
|
|
|
|
if(SvNOK(d1)) { |
124
|
28
|
|
|
|
|
|
_d1 = (float128)SvNVX(d1); |
125
|
|
|
|
|
|
|
} |
126
|
|
|
|
|
|
|
else { |
127
|
13
|
50
|
|
|
|
|
if(SvPOK(d1)) { |
128
|
13
|
100
|
|
|
|
|
if(!looks_like_number(d1)) nnum++; |
129
|
13
|
50
|
|
|
|
|
_d1 = strtoflt128(SvPV_nolen(d1), NULL) ; |
130
|
|
|
|
|
|
|
} |
131
|
|
|
|
|
|
|
else { |
132
|
0
|
0
|
|
|
|
|
if(sv_isobject(d1)) { |
133
|
0
|
0
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(d1))); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
134
|
0
|
0
|
|
|
|
|
if(strEQ(h, "Math::Float128")) |
135
|
0
|
|
|
|
|
|
_d1 = *(INT2PTR(float128 *, SvIVX(SvRV(d1)))); |
136
|
0
|
|
|
|
|
|
else croak("Invalid object given as 2nd arg to assign_cq function"); |
137
|
|
|
|
|
|
|
} |
138
|
|
|
|
|
|
|
else { |
139
|
0
|
|
|
|
|
|
croak("Invalid 2nd arg supplied to assign_cq function"); |
140
|
|
|
|
|
|
|
} |
141
|
|
|
|
|
|
|
} |
142
|
|
|
|
|
|
|
} |
143
|
|
|
|
|
|
|
} |
144
|
|
|
|
|
|
|
} |
145
|
|
|
|
|
|
|
|
146
|
77
|
50
|
|
|
|
|
if(SvUOK(d2)) { |
147
|
0
|
|
|
|
|
|
_d2 = (float128)SvUVX(d2); |
148
|
|
|
|
|
|
|
} |
149
|
|
|
|
|
|
|
else { |
150
|
77
|
100
|
|
|
|
|
if(SvIOK(d2)) { |
151
|
31
|
|
|
|
|
|
_d2 = (float128)SvIVX(d2); |
152
|
|
|
|
|
|
|
} |
153
|
|
|
|
|
|
|
else { |
154
|
46
|
100
|
|
|
|
|
if(SvNOK(d2)) { |
155
|
34
|
|
|
|
|
|
_d2 = (float128)SvNVX(d2); |
156
|
|
|
|
|
|
|
} |
157
|
|
|
|
|
|
|
else { |
158
|
12
|
50
|
|
|
|
|
if(SvPOK(d2)) { |
159
|
12
|
100
|
|
|
|
|
if(!looks_like_number(d2)) nnum++; |
160
|
12
|
50
|
|
|
|
|
_d2 = strtoflt128(SvPV_nolen(d2), NULL) ; |
161
|
|
|
|
|
|
|
} |
162
|
|
|
|
|
|
|
else { |
163
|
0
|
0
|
|
|
|
|
if(sv_isobject(d2)) { |
164
|
0
|
0
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(d2))); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
165
|
0
|
0
|
|
|
|
|
if(strEQ(h, "Math::Float128")) |
166
|
0
|
|
|
|
|
|
_d2 = *(INT2PTR(float128 *, SvIVX(SvRV(d2)))); |
167
|
0
|
|
|
|
|
|
else croak("Invalid object given as 3rd arg to assign_cq function"); |
168
|
|
|
|
|
|
|
} |
169
|
|
|
|
|
|
|
else { |
170
|
0
|
|
|
|
|
|
croak("Invalid 3rd arg supplied to assign_cq function"); |
171
|
|
|
|
|
|
|
} |
172
|
|
|
|
|
|
|
} |
173
|
|
|
|
|
|
|
} |
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
} |
176
|
|
|
|
|
|
|
|
177
|
77
|
|
|
|
|
|
__real__ *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = _d1; |
178
|
77
|
|
|
|
|
|
__imag__ *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = _d2; |
179
|
77
|
|
|
|
|
|
} |
180
|
|
|
|
|
|
|
|
181
|
4
|
|
|
|
|
|
void set_real_cq(pTHX_ SV * rop, SV * d1) { |
182
|
|
|
|
|
|
|
float128 _d1; |
183
|
|
|
|
|
|
|
|
184
|
4
|
100
|
|
|
|
|
if(SvUOK(d1)) { |
185
|
1
|
|
|
|
|
|
_d1 = (float128)SvUVX(d1); |
186
|
|
|
|
|
|
|
} |
187
|
|
|
|
|
|
|
else { |
188
|
3
|
50
|
|
|
|
|
if(SvIOK(d1)) { |
189
|
0
|
|
|
|
|
|
_d1 = (float128)SvIVX(d1); |
190
|
|
|
|
|
|
|
} |
191
|
|
|
|
|
|
|
else { |
192
|
3
|
100
|
|
|
|
|
if(SvNOK(d1)) { |
193
|
2
|
|
|
|
|
|
_d1 = (float128)SvNVX(d1); |
194
|
|
|
|
|
|
|
} |
195
|
|
|
|
|
|
|
else { |
196
|
1
|
50
|
|
|
|
|
if(SvPOK(d1)) { |
197
|
1
|
50
|
|
|
|
|
if(!looks_like_number(d1)) nnum++; |
198
|
1
|
50
|
|
|
|
|
_d1 = strtoflt128(SvPV_nolen(d1), NULL) ; |
199
|
|
|
|
|
|
|
} |
200
|
|
|
|
|
|
|
else { |
201
|
0
|
0
|
|
|
|
|
if(sv_isobject(d1)) { |
202
|
0
|
0
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(d1))); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
203
|
0
|
0
|
|
|
|
|
if(strEQ(h, "Math::Float128")) |
204
|
0
|
|
|
|
|
|
_d1 = *(INT2PTR(float128 *, SvIVX(SvRV(d1)))); |
205
|
0
|
|
|
|
|
|
else croak("Invalid object given as 2nd arg to set_real_cq function"); |
206
|
|
|
|
|
|
|
} |
207
|
|
|
|
|
|
|
else { |
208
|
0
|
|
|
|
|
|
croak("Invalid 2nd arg supplied to set_real_cq function"); |
209
|
|
|
|
|
|
|
} |
210
|
|
|
|
|
|
|
} |
211
|
|
|
|
|
|
|
} |
212
|
|
|
|
|
|
|
} |
213
|
|
|
|
|
|
|
} |
214
|
|
|
|
|
|
|
|
215
|
4
|
|
|
|
|
|
__real__ *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = _d1; |
216
|
4
|
|
|
|
|
|
} |
217
|
|
|
|
|
|
|
|
218
|
4
|
|
|
|
|
|
void set_imag_cq(pTHX_ SV * rop, SV * d2) { |
219
|
|
|
|
|
|
|
float128 _d2; |
220
|
|
|
|
|
|
|
|
221
|
4
|
50
|
|
|
|
|
if(SvUOK(d2)) { |
222
|
0
|
|
|
|
|
|
_d2 = (float128)SvUVX(d2); |
223
|
|
|
|
|
|
|
} |
224
|
|
|
|
|
|
|
else { |
225
|
4
|
100
|
|
|
|
|
if(SvIOK(d2)) { |
226
|
3
|
|
|
|
|
|
_d2 = (float128)SvIVX(d2); |
227
|
|
|
|
|
|
|
} |
228
|
|
|
|
|
|
|
else { |
229
|
1
|
50
|
|
|
|
|
if(SvNOK(d2)) { |
230
|
0
|
|
|
|
|
|
_d2 = (float128)SvNVX(d2); |
231
|
|
|
|
|
|
|
} |
232
|
|
|
|
|
|
|
else { |
233
|
1
|
50
|
|
|
|
|
if(SvPOK(d2)) { |
234
|
1
|
50
|
|
|
|
|
if(!looks_like_number(d2)) nnum++; |
235
|
1
|
50
|
|
|
|
|
_d2 = strtoflt128(SvPV_nolen(d2), NULL) ; |
236
|
|
|
|
|
|
|
} |
237
|
|
|
|
|
|
|
else { |
238
|
0
|
0
|
|
|
|
|
if(sv_isobject(d2)) { |
239
|
0
|
0
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(d2))); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
240
|
0
|
0
|
|
|
|
|
if(strEQ(h, "Math::Float128")) |
241
|
0
|
|
|
|
|
|
_d2 = *(INT2PTR(float128 *, SvIVX(SvRV(d2)))); |
242
|
0
|
|
|
|
|
|
else croak("Invalid object given as 2nd arg to set_imag_cq function"); |
243
|
|
|
|
|
|
|
} |
244
|
|
|
|
|
|
|
else { |
245
|
0
|
|
|
|
|
|
croak("Invalid 2nd arg supplied to set_imag_cq function"); |
246
|
|
|
|
|
|
|
} |
247
|
|
|
|
|
|
|
} |
248
|
|
|
|
|
|
|
} |
249
|
|
|
|
|
|
|
} |
250
|
|
|
|
|
|
|
} |
251
|
|
|
|
|
|
|
|
252
|
4
|
|
|
|
|
|
__imag__ *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = _d2; |
253
|
4
|
|
|
|
|
|
} |
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
|
256
|
0
|
|
|
|
|
|
void F2cq(pTHX_ SV * rop, SV * d1, SV * d2) { |
257
|
|
|
|
|
|
|
float128 _d1, _d2; |
258
|
|
|
|
|
|
|
|
259
|
0
|
0
|
|
|
|
|
if(sv_isobject(d1) && sv_isobject(d2)) { |
|
|
0
|
|
|
|
|
|
260
|
0
|
0
|
|
|
|
|
const char *h1 = HvNAME(SvSTASH(SvRV(d1))); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
261
|
0
|
0
|
|
|
|
|
const char *h2 = HvNAME(SvSTASH(SvRV(d2))); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
262
|
0
|
0
|
|
|
|
|
if(strEQ(h1, "Math::Float128") && |
|
|
0
|
|
|
|
|
|
263
|
0
|
|
|
|
|
|
strEQ(h2, "Math::Float128")) { |
264
|
|
|
|
|
|
|
|
265
|
0
|
|
|
|
|
|
_d1 = *(INT2PTR(float128 *, SvIVX(SvRV(d1)))); |
266
|
0
|
|
|
|
|
|
_d2 = *(INT2PTR(float128 *, SvIVX(SvRV(d2)))); |
267
|
|
|
|
|
|
|
|
268
|
0
|
|
|
|
|
|
__real__ *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = _d1; |
269
|
0
|
|
|
|
|
|
__imag__ *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = _d2; |
270
|
|
|
|
|
|
|
} |
271
|
0
|
|
|
|
|
|
else croak("Both 2nd and 3rd args supplied to F2cq need to be Math::Float128 objects"); |
272
|
|
|
|
|
|
|
} |
273
|
0
|
|
|
|
|
|
else croak("Both 2nd and 3rd args supplied to F2cq need to be Math::Float128 objects"); |
274
|
0
|
|
|
|
|
|
} |
275
|
|
|
|
|
|
|
|
276
|
0
|
|
|
|
|
|
void cq2F(pTHX_ SV * rop1, SV * rop2, SV * op) { |
277
|
0
|
0
|
|
|
|
|
if(sv_isobject(rop1)) { |
278
|
0
|
0
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(rop1))); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
279
|
0
|
0
|
|
|
|
|
if(strEQ(h, "Math::Float128")) { |
280
|
0
|
|
|
|
|
|
*(INT2PTR(float128 *, SvIVX(SvRV(rop1)))) = crealq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
281
|
|
|
|
|
|
|
} |
282
|
0
|
|
|
|
|
|
else croak("1st arg (a %s object) supplied to cq2F needs to be a Math::Float128 object", h); |
283
|
|
|
|
|
|
|
} |
284
|
0
|
|
|
|
|
|
else croak("1st arg (which needs to be a Math::Float128 object) supplied to cq2F is not an object"); |
285
|
|
|
|
|
|
|
|
286
|
0
|
0
|
|
|
|
|
if(sv_isobject(rop2)) { |
287
|
0
|
0
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(rop2))); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
288
|
0
|
0
|
|
|
|
|
if(strEQ(h, "Math::Float128")) { |
289
|
0
|
|
|
|
|
|
*(INT2PTR(float128 *, SvIVX(SvRV(rop2)))) = cimagq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
290
|
|
|
|
|
|
|
} |
291
|
0
|
|
|
|
|
|
else croak("2nd arg (a %s object) supplied to cq2F needs to be a Math::Float128 object", h); |
292
|
|
|
|
|
|
|
} |
293
|
0
|
|
|
|
|
|
else croak("2nd arg (which needs to be a Math::Float128 object) supplied to cq2F is not an object"); |
294
|
0
|
|
|
|
|
|
} |
295
|
|
|
|
|
|
|
|
296
|
1
|
|
|
|
|
|
void mul_cq(pTHX_ SV * rop, SV * op1, SV * op2) { |
297
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op1)))) * |
298
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op2)))); |
299
|
1
|
|
|
|
|
|
} |
300
|
|
|
|
|
|
|
|
301
|
1
|
|
|
|
|
|
void mul_c_nvq(pTHX_ SV * rop, SV * op1, SV * op2) { |
302
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op1)))) * |
303
|
1
|
50
|
|
|
|
|
(float128)SvNV(op2); |
304
|
1
|
|
|
|
|
|
} |
305
|
|
|
|
|
|
|
|
306
|
1
|
|
|
|
|
|
void mul_c_ivq(pTHX_ SV * rop, SV * op1, SV * op2) { |
307
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op1)))) * |
308
|
1
|
50
|
|
|
|
|
(float128)SvIV(op2); |
309
|
1
|
|
|
|
|
|
} |
310
|
|
|
|
|
|
|
|
311
|
1
|
|
|
|
|
|
void mul_c_uvq(pTHX_ SV * rop, SV * op1, SV * op2) { |
312
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op1)))) * |
313
|
1
|
50
|
|
|
|
|
(float128)SvUV(op2); |
314
|
1
|
|
|
|
|
|
} |
315
|
|
|
|
|
|
|
|
316
|
1
|
|
|
|
|
|
void mul_c_pvq(pTHX_ SV * rop, SV * op1, SV * op2) { |
317
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op1)))) * |
318
|
1
|
50
|
|
|
|
|
strtoflt128(SvPV_nolen(op2), NULL); |
319
|
1
|
|
|
|
|
|
} |
320
|
|
|
|
|
|
|
|
321
|
1
|
|
|
|
|
|
void div_cq(pTHX_ SV * rop, SV * op1, SV * op2) { |
322
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op1)))) / |
323
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op2)))); |
324
|
1
|
|
|
|
|
|
} |
325
|
|
|
|
|
|
|
|
326
|
1
|
|
|
|
|
|
void div_c_nvq(pTHX_ SV * rop, SV * op1, SV * op2) { |
327
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op1)))) / |
328
|
1
|
50
|
|
|
|
|
(float128)SvNV(op2); |
329
|
1
|
|
|
|
|
|
} |
330
|
|
|
|
|
|
|
|
331
|
1
|
|
|
|
|
|
void div_c_ivq(pTHX_ SV * rop, SV * op1, SV * op2) { |
332
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op1)))) / |
333
|
1
|
50
|
|
|
|
|
(float128)SvIV(op2); |
334
|
1
|
|
|
|
|
|
} |
335
|
|
|
|
|
|
|
|
336
|
1
|
|
|
|
|
|
void div_c_uvq(pTHX_ SV * rop, SV * op1, SV * op2) { |
337
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op1)))) / |
338
|
1
|
50
|
|
|
|
|
(float128)SvUV(op2); |
339
|
1
|
|
|
|
|
|
} |
340
|
|
|
|
|
|
|
|
341
|
1
|
|
|
|
|
|
void div_c_pvq(pTHX_ SV * rop, SV * op1, SV * op2) { |
342
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op1)))) / |
343
|
1
|
50
|
|
|
|
|
strtoflt128(SvPV_nolen(op2), NULL); |
344
|
1
|
|
|
|
|
|
} |
345
|
|
|
|
|
|
|
|
346
|
1
|
|
|
|
|
|
void add_cq(pTHX_ SV * rop, SV * op1, SV * op2) { |
347
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op1)))) + |
348
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op2)))); |
349
|
1
|
|
|
|
|
|
} |
350
|
|
|
|
|
|
|
|
351
|
1
|
|
|
|
|
|
void add_c_nvq(pTHX_ SV * rop, SV * op1, SV * op2) { |
352
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op1)))) + |
353
|
1
|
50
|
|
|
|
|
(float128)SvNV(op2); |
354
|
1
|
|
|
|
|
|
} |
355
|
|
|
|
|
|
|
|
356
|
1
|
|
|
|
|
|
void add_c_ivq(pTHX_ SV * rop, SV * op1, SV * op2) { |
357
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op1)))) + |
358
|
1
|
50
|
|
|
|
|
(float128)SvIV(op2); |
359
|
1
|
|
|
|
|
|
} |
360
|
|
|
|
|
|
|
|
361
|
1
|
|
|
|
|
|
void add_c_uvq(pTHX_ SV * rop, SV * op1, SV * op2) { |
362
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op1)))) + |
363
|
1
|
50
|
|
|
|
|
(float128)SvUV(op2); |
364
|
1
|
|
|
|
|
|
} |
365
|
|
|
|
|
|
|
|
366
|
1
|
|
|
|
|
|
void add_c_pvq(pTHX_ SV * rop, SV * op1, SV * op2) { |
367
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op1)))) + |
368
|
1
|
50
|
|
|
|
|
strtoflt128(SvPV_nolen(op2), NULL); |
369
|
1
|
|
|
|
|
|
} |
370
|
|
|
|
|
|
|
|
371
|
1
|
|
|
|
|
|
void sub_cq(pTHX_ SV * rop, SV * op1, SV * op2) { |
372
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op1)))) - |
373
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op2)))); |
374
|
1
|
|
|
|
|
|
} |
375
|
|
|
|
|
|
|
|
376
|
1
|
|
|
|
|
|
void sub_c_nvq(pTHX_ SV * rop, SV * op1, SV * op2) { |
377
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op1)))) - |
378
|
1
|
50
|
|
|
|
|
(float128)SvNV(op2); |
379
|
1
|
|
|
|
|
|
} |
380
|
|
|
|
|
|
|
|
381
|
1
|
|
|
|
|
|
void sub_c_ivq(pTHX_ SV * rop, SV * op1, SV * op2) { |
382
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op1)))) - |
383
|
1
|
50
|
|
|
|
|
(float128)SvIV(op2); |
384
|
1
|
|
|
|
|
|
} |
385
|
|
|
|
|
|
|
|
386
|
1
|
|
|
|
|
|
void sub_c_uvq(pTHX_ SV * rop, SV * op1, SV * op2) { |
387
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op1)))) - |
388
|
1
|
50
|
|
|
|
|
(float128)SvUV(op2); |
389
|
1
|
|
|
|
|
|
} |
390
|
|
|
|
|
|
|
|
391
|
1
|
|
|
|
|
|
void sub_c_pvq(pTHX_ SV * rop, SV * op1, SV * op2) { |
392
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op1)))) - |
393
|
1
|
50
|
|
|
|
|
strtoflt128(SvPV_nolen(op2), NULL); |
394
|
1
|
|
|
|
|
|
} |
395
|
|
|
|
|
|
|
|
396
|
128
|
|
|
|
|
|
void DESTROY(pTHX_ SV * op) { |
397
|
128
|
|
|
|
|
|
Safefree(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op)))); |
398
|
128
|
|
|
|
|
|
} |
399
|
|
|
|
|
|
|
|
400
|
81
|
|
|
|
|
|
SV * real_cq(pTHX_ SV * op) { |
401
|
81
|
|
|
|
|
|
return newSVnv(crealq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op)))))); |
402
|
|
|
|
|
|
|
} |
403
|
|
|
|
|
|
|
|
404
|
0
|
|
|
|
|
|
SV * real_cq2F(pTHX_ SV * op) { |
405
|
|
|
|
|
|
|
float128 * f; |
406
|
|
|
|
|
|
|
SV * obj_ref, * obj; |
407
|
|
|
|
|
|
|
|
408
|
0
|
|
|
|
|
|
Newx(f, 1, float128); |
409
|
0
|
0
|
|
|
|
|
if(f == NULL) croak("Failed to allocate memory in real_cq2F function"); |
410
|
|
|
|
|
|
|
|
411
|
0
|
|
|
|
|
|
obj_ref = newSV(0); |
412
|
0
|
|
|
|
|
|
obj = newSVrv(obj_ref, "Math::Float128"); |
413
|
|
|
|
|
|
|
|
414
|
0
|
|
|
|
|
|
*f = crealq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
415
|
|
|
|
|
|
|
|
416
|
0
|
|
|
|
|
|
sv_setiv(obj, INT2PTR(IV,f)); |
417
|
0
|
|
|
|
|
|
SvREADONLY_on(obj); |
418
|
0
|
|
|
|
|
|
return obj_ref; |
419
|
|
|
|
|
|
|
} |
420
|
|
|
|
|
|
|
|
421
|
1
|
|
|
|
|
|
void real_cq2str(pTHX_ SV * op) { |
422
|
1
|
|
|
|
|
|
dXSARGS; |
423
|
|
|
|
|
|
|
float128 t; |
424
|
|
|
|
|
|
|
char * buffer; |
425
|
|
|
|
|
|
|
|
426
|
1
|
50
|
|
|
|
|
if(sv_isobject(op)) { |
427
|
1
|
50
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(op))); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
428
|
1
|
50
|
|
|
|
|
if(strEQ(h, "Math::Complex_C::Q")) { |
429
|
1
|
50
|
|
|
|
|
EXTEND(SP, 1); |
430
|
1
|
|
|
|
|
|
t = crealq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
431
|
|
|
|
|
|
|
|
432
|
1
|
|
|
|
|
|
Newx(buffer, 15 + _MATH_COMPLEX_C_Q_DIGITS, char); |
433
|
1
|
50
|
|
|
|
|
if(buffer == NULL) croak("Failed to allocate memory in real_cq2str"); |
434
|
1
|
|
|
|
|
|
quadmath_snprintf(buffer, 15 + _MATH_COMPLEX_C_Q_DIGITS, "%.*Qe", _MATH_COMPLEX_C_Q_DIGITS - 1, t); |
435
|
1
|
|
|
|
|
|
ST(0) = sv_2mortal(newSVpv(buffer, 0)); |
436
|
1
|
|
|
|
|
|
Safefree(buffer); |
437
|
1
|
|
|
|
|
|
XSRETURN(1); |
438
|
|
|
|
|
|
|
} |
439
|
0
|
|
|
|
|
|
else croak("Invalid object supplied to Math::Complex_C::Q::real_cq2str function"); |
440
|
|
|
|
|
|
|
} |
441
|
0
|
|
|
|
|
|
else croak("Invalid argument supplied to Math::Complex_C::Q::real_cq2str function"); |
442
|
|
|
|
|
|
|
} |
443
|
|
|
|
|
|
|
|
444
|
60
|
|
|
|
|
|
SV * imag_cq(pTHX_ SV * op) { |
445
|
60
|
|
|
|
|
|
return newSVnv(cimagq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op)))))); |
446
|
|
|
|
|
|
|
} |
447
|
|
|
|
|
|
|
|
448
|
0
|
|
|
|
|
|
SV * imag_cq2F(pTHX_ SV * op) { |
449
|
|
|
|
|
|
|
float128 * f; |
450
|
|
|
|
|
|
|
SV * obj_ref, * obj; |
451
|
|
|
|
|
|
|
|
452
|
0
|
|
|
|
|
|
Newx(f, 1, float128); |
453
|
0
|
0
|
|
|
|
|
if(f == NULL) croak("Failed to allocate memory in imag_cq2F function"); |
454
|
|
|
|
|
|
|
|
455
|
0
|
|
|
|
|
|
obj_ref = newSV(0); |
456
|
0
|
|
|
|
|
|
obj = newSVrv(obj_ref, "Math::Float128"); |
457
|
|
|
|
|
|
|
|
458
|
0
|
|
|
|
|
|
*f = cimagq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
459
|
|
|
|
|
|
|
|
460
|
0
|
|
|
|
|
|
sv_setiv(obj, INT2PTR(IV,f)); |
461
|
0
|
|
|
|
|
|
SvREADONLY_on(obj); |
462
|
0
|
|
|
|
|
|
return obj_ref; |
463
|
|
|
|
|
|
|
} |
464
|
|
|
|
|
|
|
|
465
|
1
|
|
|
|
|
|
void imag_cq2str(pTHX_ SV * op) { |
466
|
1
|
|
|
|
|
|
dXSARGS; |
467
|
|
|
|
|
|
|
float128 t; |
468
|
|
|
|
|
|
|
char * buffer; |
469
|
|
|
|
|
|
|
|
470
|
1
|
50
|
|
|
|
|
if(sv_isobject(op)) { |
471
|
1
|
50
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(op))); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
472
|
1
|
50
|
|
|
|
|
if(strEQ(h, "Math::Complex_C::Q")) { |
473
|
1
|
50
|
|
|
|
|
EXTEND(SP, 1); |
474
|
1
|
|
|
|
|
|
t = cimagq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
475
|
|
|
|
|
|
|
|
476
|
1
|
|
|
|
|
|
Newx(buffer, 15 + _MATH_COMPLEX_C_Q_DIGITS, char); |
477
|
1
|
50
|
|
|
|
|
if(buffer == NULL) croak("Failed to allocate memory in imag_cq2str"); |
478
|
1
|
|
|
|
|
|
quadmath_snprintf(buffer, 15 + _MATH_COMPLEX_C_Q_DIGITS, "%.*Qe", _MATH_COMPLEX_C_Q_DIGITS - 1, t); |
479
|
1
|
|
|
|
|
|
ST(0) = sv_2mortal(newSVpv(buffer, 0)); |
480
|
1
|
|
|
|
|
|
Safefree(buffer); |
481
|
1
|
|
|
|
|
|
XSRETURN(1); |
482
|
|
|
|
|
|
|
} |
483
|
0
|
|
|
|
|
|
else croak("Invalid object supplied to Math::Complex_C::Q::imag_cq2str function"); |
484
|
|
|
|
|
|
|
} |
485
|
0
|
|
|
|
|
|
else croak("Invalid argument supplied to Math::Complex_C::Q::imag_cq2str function"); |
486
|
|
|
|
|
|
|
} |
487
|
|
|
|
|
|
|
|
488
|
1
|
|
|
|
|
|
SV * arg_cq(pTHX_ SV * op) { |
489
|
1
|
|
|
|
|
|
return newSVnv(cargq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op)))))); |
490
|
|
|
|
|
|
|
} |
491
|
|
|
|
|
|
|
|
492
|
0
|
|
|
|
|
|
SV * arg_cq2F(pTHX_ SV * op) { |
493
|
|
|
|
|
|
|
float128 * f; |
494
|
|
|
|
|
|
|
SV * obj_ref, * obj; |
495
|
|
|
|
|
|
|
|
496
|
0
|
|
|
|
|
|
Newx(f, 1, float128); |
497
|
0
|
0
|
|
|
|
|
if(f == NULL) croak("Failed to allocate memory in arg_cq2F function"); |
498
|
|
|
|
|
|
|
|
499
|
0
|
|
|
|
|
|
obj_ref = newSV(0); |
500
|
0
|
|
|
|
|
|
obj = newSVrv(obj_ref, "Math::Float128"); |
501
|
|
|
|
|
|
|
|
502
|
0
|
|
|
|
|
|
*f = cargq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
503
|
|
|
|
|
|
|
|
504
|
0
|
|
|
|
|
|
sv_setiv(obj, INT2PTR(IV,f)); |
505
|
0
|
|
|
|
|
|
SvREADONLY_on(obj); |
506
|
0
|
|
|
|
|
|
return obj_ref; |
507
|
|
|
|
|
|
|
} |
508
|
|
|
|
|
|
|
|
509
|
1
|
|
|
|
|
|
void arg_cq2str(pTHX_ SV * op) { |
510
|
1
|
|
|
|
|
|
dXSARGS; |
511
|
|
|
|
|
|
|
float128 t; |
512
|
|
|
|
|
|
|
char * buffer; |
513
|
|
|
|
|
|
|
|
514
|
1
|
50
|
|
|
|
|
if(sv_isobject(op)) { |
515
|
1
|
50
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(op))); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
516
|
1
|
50
|
|
|
|
|
if(strEQ(h, "Math::Complex_C::Q")) { |
517
|
1
|
50
|
|
|
|
|
EXTEND(SP, 1); |
518
|
1
|
|
|
|
|
|
t = cargq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
519
|
|
|
|
|
|
|
|
520
|
1
|
|
|
|
|
|
Newx(buffer, 15 + _MATH_COMPLEX_C_Q_DIGITS, char); |
521
|
1
|
50
|
|
|
|
|
if(buffer == NULL) croak("Failed to allocate memory in arg_cq2str"); |
522
|
1
|
|
|
|
|
|
quadmath_snprintf(buffer, 15 + _MATH_COMPLEX_C_Q_DIGITS, "%.*Qe", _MATH_COMPLEX_C_Q_DIGITS - 1, t); |
523
|
1
|
|
|
|
|
|
ST(0) = sv_2mortal(newSVpv(buffer, 0)); |
524
|
1
|
|
|
|
|
|
Safefree(buffer); |
525
|
1
|
|
|
|
|
|
XSRETURN(1); |
526
|
|
|
|
|
|
|
} |
527
|
0
|
|
|
|
|
|
else croak("Invalid object supplied to Math::Complex_C::Q::arg_cq2str function"); |
528
|
|
|
|
|
|
|
} |
529
|
0
|
|
|
|
|
|
else croak("Invalid argument supplied to Math::Complex_C::Q::arg_cq2str function"); |
530
|
|
|
|
|
|
|
} |
531
|
|
|
|
|
|
|
|
532
|
1
|
|
|
|
|
|
SV * abs_cq(pTHX_ SV * op) { |
533
|
1
|
|
|
|
|
|
return newSVnv(cabsq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op)))))); |
534
|
|
|
|
|
|
|
} |
535
|
|
|
|
|
|
|
|
536
|
0
|
|
|
|
|
|
SV * abs_cq2F(pTHX_ SV * op) { |
537
|
|
|
|
|
|
|
float128 * f; |
538
|
|
|
|
|
|
|
SV * obj_ref, * obj; |
539
|
|
|
|
|
|
|
|
540
|
0
|
|
|
|
|
|
Newx(f, 1, float128); |
541
|
0
|
0
|
|
|
|
|
if(f == NULL) croak("Failed to allocate memory in cabs_cq2F function"); |
542
|
|
|
|
|
|
|
|
543
|
0
|
|
|
|
|
|
obj_ref = newSV(0); |
544
|
0
|
|
|
|
|
|
obj = newSVrv(obj_ref, "Math::Float128"); |
545
|
|
|
|
|
|
|
|
546
|
0
|
|
|
|
|
|
*f = cabsq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
547
|
|
|
|
|
|
|
|
548
|
0
|
|
|
|
|
|
sv_setiv(obj, INT2PTR(IV,f)); |
549
|
0
|
|
|
|
|
|
SvREADONLY_on(obj); |
550
|
0
|
|
|
|
|
|
return obj_ref; |
551
|
|
|
|
|
|
|
} |
552
|
|
|
|
|
|
|
|
553
|
1
|
|
|
|
|
|
void abs_cq2str(pTHX_ SV * op) { |
554
|
1
|
|
|
|
|
|
dXSARGS; |
555
|
|
|
|
|
|
|
float128 t; |
556
|
|
|
|
|
|
|
char * buffer; |
557
|
|
|
|
|
|
|
|
558
|
1
|
50
|
|
|
|
|
if(sv_isobject(op)) { |
559
|
1
|
50
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(op))); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
560
|
1
|
50
|
|
|
|
|
if(strEQ(h, "Math::Complex_C::Q")) { |
561
|
1
|
50
|
|
|
|
|
EXTEND(SP, 1); |
562
|
1
|
|
|
|
|
|
t = cabsq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
563
|
|
|
|
|
|
|
|
564
|
1
|
|
|
|
|
|
Newx(buffer, 15 + _MATH_COMPLEX_C_Q_DIGITS, char); |
565
|
1
|
50
|
|
|
|
|
if(buffer == NULL) croak("Failed to allocate memory in arg_cq2str"); |
566
|
1
|
|
|
|
|
|
quadmath_snprintf(buffer, 15 + _MATH_COMPLEX_C_Q_DIGITS, "%.*Qe", _MATH_COMPLEX_C_Q_DIGITS - 1, t); |
567
|
1
|
|
|
|
|
|
ST(0) = sv_2mortal(newSVpv(buffer, 0)); |
568
|
1
|
|
|
|
|
|
Safefree(buffer); |
569
|
1
|
|
|
|
|
|
XSRETURN(1); |
570
|
|
|
|
|
|
|
} |
571
|
0
|
|
|
|
|
|
else croak("Invalid object supplied to Math::Complex_C::Q::abs_cq2str function"); |
572
|
|
|
|
|
|
|
} |
573
|
0
|
|
|
|
|
|
else croak("Invalid argument supplied to Math::Complex_C::Q::abs_cq2str function"); |
574
|
|
|
|
|
|
|
} |
575
|
|
|
|
|
|
|
|
576
|
1
|
|
|
|
|
|
void conj_cq(pTHX_ SV * rop, SV * op) { |
577
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = conjq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
578
|
1
|
|
|
|
|
|
} |
579
|
|
|
|
|
|
|
|
580
|
1
|
|
|
|
|
|
void acos_cq(pTHX_ SV * rop, SV * op) { |
581
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = cacosq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
582
|
1
|
|
|
|
|
|
} |
583
|
|
|
|
|
|
|
|
584
|
1
|
|
|
|
|
|
void asin_cq(pTHX_ SV * rop, SV * op) { |
585
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = casinq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
586
|
1
|
|
|
|
|
|
} |
587
|
|
|
|
|
|
|
|
588
|
1
|
|
|
|
|
|
void atan_cq(pTHX_ SV * rop, SV * op) { |
589
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = catanq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
590
|
1
|
|
|
|
|
|
} |
591
|
|
|
|
|
|
|
|
592
|
1
|
|
|
|
|
|
void cos_cq(pTHX_ SV * rop, SV * op) { |
593
|
|
|
|
|
|
|
#ifdef MINGW_W64_BUGGY |
594
|
|
|
|
|
|
|
croak("cos_cq not implemented for mingw-w64 compilers"); |
595
|
|
|
|
|
|
|
#else |
596
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = ccosq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
597
|
|
|
|
|
|
|
#endif |
598
|
1
|
|
|
|
|
|
} |
599
|
|
|
|
|
|
|
|
600
|
1
|
|
|
|
|
|
void sin_cq(pTHX_ SV * rop, SV * op) { |
601
|
|
|
|
|
|
|
#ifdef MINGW_W64_BUGGY |
602
|
|
|
|
|
|
|
croak("sin_cq not implemented for mingw-w64 compilers"); |
603
|
|
|
|
|
|
|
#else |
604
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = csinq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
605
|
|
|
|
|
|
|
#endif |
606
|
1
|
|
|
|
|
|
} |
607
|
|
|
|
|
|
|
|
608
|
1
|
|
|
|
|
|
void tan_cq(pTHX_ SV * rop, SV * op) { |
609
|
|
|
|
|
|
|
#if defined(MINGW_W64_BUGGY) |
610
|
|
|
|
|
|
|
croak("tan_cq not implemented for mingw-w64 compilers"); |
611
|
|
|
|
|
|
|
#elif defined(GCC_TAN_BUG) |
612
|
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = csinq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))) / |
613
|
|
|
|
|
|
|
ccosq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
614
|
|
|
|
|
|
|
#else |
615
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = ctanq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
616
|
|
|
|
|
|
|
#endif |
617
|
1
|
|
|
|
|
|
} |
618
|
|
|
|
|
|
|
|
619
|
1
|
|
|
|
|
|
void acosh_cq(pTHX_ SV * rop, SV * op) { |
620
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = cacoshq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
621
|
1
|
|
|
|
|
|
} |
622
|
|
|
|
|
|
|
|
623
|
1
|
|
|
|
|
|
void asinh_cq(pTHX_ SV * rop, SV * op) { |
624
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = casinhq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
625
|
1
|
|
|
|
|
|
} |
626
|
|
|
|
|
|
|
|
627
|
1
|
|
|
|
|
|
void atanh_cq(pTHX_ SV * rop, SV * op) { |
628
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = catanhq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
629
|
1
|
|
|
|
|
|
} |
630
|
|
|
|
|
|
|
|
631
|
1
|
|
|
|
|
|
void cosh_cq(pTHX_ SV * rop, SV * op) { |
632
|
|
|
|
|
|
|
#ifdef MINGW_W64_BUGGY |
633
|
|
|
|
|
|
|
croak("cosh_cq not implemented for mingw-w64 compilers"); |
634
|
|
|
|
|
|
|
#else |
635
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = ccoshq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
636
|
|
|
|
|
|
|
#endif |
637
|
1
|
|
|
|
|
|
} |
638
|
|
|
|
|
|
|
|
639
|
1
|
|
|
|
|
|
void sinh_cq(pTHX_ SV * rop, SV * op) { |
640
|
|
|
|
|
|
|
#ifdef MINGW_W64_BUGGY |
641
|
|
|
|
|
|
|
croak("sinh_cq not implemented for mingw-w64 compilers"); |
642
|
|
|
|
|
|
|
#else |
643
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = csinhq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
644
|
|
|
|
|
|
|
#endif |
645
|
1
|
|
|
|
|
|
} |
646
|
|
|
|
|
|
|
|
647
|
1
|
|
|
|
|
|
void tanh_cq(pTHX_ SV * rop, SV * op) { |
648
|
|
|
|
|
|
|
#ifdef MINGW_W64_BUGGY |
649
|
|
|
|
|
|
|
croak("tanh_cq not implemented for mingw-w64 compilers"); |
650
|
|
|
|
|
|
|
#elif defined(GCC_TAN_BUG) |
651
|
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = csinhq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))) / |
652
|
|
|
|
|
|
|
ccoshq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
653
|
|
|
|
|
|
|
#else |
654
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = ctanhq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
655
|
|
|
|
|
|
|
#endif |
656
|
1
|
|
|
|
|
|
} |
657
|
|
|
|
|
|
|
|
658
|
1
|
|
|
|
|
|
void exp_cq(pTHX_ SV * rop, SV * op) { |
659
|
|
|
|
|
|
|
#ifdef MINGW_W64_BUGGY /* avoid calling expq() as it's buggy */ |
660
|
|
|
|
|
|
|
croak("exp_cq not implemented for mingw-w64 compilers"); |
661
|
|
|
|
|
|
|
#else |
662
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = cexpq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
663
|
|
|
|
|
|
|
#endif |
664
|
1
|
|
|
|
|
|
} |
665
|
|
|
|
|
|
|
|
666
|
1
|
|
|
|
|
|
void log_cq(pTHX_ SV * rop, SV * op) { |
667
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = clogq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
668
|
1
|
|
|
|
|
|
} |
669
|
|
|
|
|
|
|
|
670
|
1
|
|
|
|
|
|
void sqrt_cq(pTHX_ SV * rop, SV * op) { |
671
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = csqrtq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
672
|
1
|
|
|
|
|
|
} |
673
|
|
|
|
|
|
|
|
674
|
6
|
|
|
|
|
|
void proj_cq(pTHX_ SV * rop, SV * op) { |
675
|
6
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = cprojq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op))))); |
676
|
6
|
|
|
|
|
|
} |
677
|
|
|
|
|
|
|
|
678
|
1
|
|
|
|
|
|
void pow_cq(pTHX_ SV * rop, SV * op, SV * exp) { |
679
|
|
|
|
|
|
|
#ifdef MINGW_W64_BUGGY |
680
|
|
|
|
|
|
|
croak("pow_cq not implemented for mingw-w64 compilers"); |
681
|
|
|
|
|
|
|
#else |
682
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))) = cpowq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(op)))), |
683
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(exp))))); |
684
|
|
|
|
|
|
|
#endif |
685
|
1
|
|
|
|
|
|
} |
686
|
|
|
|
|
|
|
|
687
|
4
|
|
|
|
|
|
SV * _overload_true(pTHX_ SV * rop, SV * second, SV * third) { |
688
|
6
|
|
|
|
|
|
if (_is_nan(crealq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))))) && |
689
|
4
|
|
|
|
|
|
_is_nan(cimagq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop))))))) return newSVuv(0); |
690
|
2
|
|
|
|
|
|
if(crealq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop))))) || |
691
|
2
|
|
|
|
|
|
cimagq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))))) return newSVuv(1); |
692
|
0
|
|
|
|
|
|
return newSVuv(0); |
693
|
|
|
|
|
|
|
} |
694
|
|
|
|
|
|
|
|
695
|
8
|
|
|
|
|
|
SV * _overload_not(pTHX_ SV * rop, SV * second, SV * third) { |
696
|
12
|
|
|
|
|
|
if (_is_nan(crealq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))))) && |
697
|
8
|
|
|
|
|
|
_is_nan(cimagq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop))))))) return newSVuv(1); |
698
|
4
|
|
|
|
|
|
if(crealq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop))))) || |
699
|
4
|
|
|
|
|
|
cimagq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))))) return newSVuv(0); |
700
|
0
|
|
|
|
|
|
return newSVuv(1); |
701
|
|
|
|
|
|
|
} |
702
|
|
|
|
|
|
|
|
703
|
41
|
|
|
|
|
|
SV * _overload_equiv(pTHX_ SV * a, SV * b, SV * third) { |
704
|
41
|
100
|
|
|
|
|
if(SvUOK(b)) { |
705
|
2
|
|
|
|
|
|
if((float128)SvUVX(b) == crealq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a))))) && |
706
|
2
|
|
|
|
|
|
0.0Q == cimagq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))))) return newSVuv(1); |
707
|
0
|
|
|
|
|
|
return newSVuv(0); |
708
|
|
|
|
|
|
|
} |
709
|
40
|
100
|
|
|
|
|
if(SvIOK(b)) { |
710
|
8
|
|
|
|
|
|
if((float128)SvIVX(b) == crealq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a))))) && |
711
|
8
|
|
|
|
|
|
0.0Q == cimagq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))))) return newSVuv(1); |
712
|
0
|
|
|
|
|
|
return newSVuv(0); |
713
|
|
|
|
|
|
|
} |
714
|
36
|
50
|
|
|
|
|
if(SvNOK(b)) { |
715
|
0
|
|
|
|
|
|
if((float128)SvNVX(b) == crealq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a))))) && |
716
|
0
|
|
|
|
|
|
0.0Q == cimagq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))))) return newSVuv(1); |
717
|
0
|
|
|
|
|
|
return newSVuv(0); |
718
|
|
|
|
|
|
|
} |
719
|
|
|
|
|
|
|
|
720
|
36
|
100
|
|
|
|
|
if(SvPOK(b)) { |
721
|
2
|
50
|
|
|
|
|
if(!looks_like_number(b)) nnum++; |
722
|
3
|
50
|
|
|
|
|
if(strtoflt128(SvPV_nolen(b), NULL) == crealq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a))))) && |
723
|
2
|
|
|
|
|
|
0.0Q == cimagq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))))) return newSVuv(1); |
724
|
1
|
|
|
|
|
|
return newSVuv(0); |
725
|
|
|
|
|
|
|
} |
726
|
|
|
|
|
|
|
|
727
|
34
|
50
|
|
|
|
|
if(sv_isobject(b)) { |
728
|
34
|
50
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(b))); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
729
|
34
|
50
|
|
|
|
|
if(strEQ(h, "Math::Complex_C::Q")) { |
730
|
67
|
|
|
|
|
|
if(crealq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a))))) == crealq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(b))))) && |
731
|
33
|
|
|
|
|
|
cimagq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a))))) == cimagq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(b)))))) |
732
|
33
|
|
|
|
|
|
return newSVuv(1); |
733
|
1
|
|
|
|
|
|
return newSVuv(0); |
734
|
|
|
|
|
|
|
} |
735
|
|
|
|
|
|
|
} |
736
|
|
|
|
|
|
|
|
737
|
0
|
|
|
|
|
|
croak("Invalid argument supplied to Math::Complex_C::Q::_overload_equiv function"); |
738
|
|
|
|
|
|
|
} |
739
|
|
|
|
|
|
|
|
740
|
7
|
|
|
|
|
|
SV * _overload_not_equiv(pTHX_ SV * a, SV * b, SV * third) { |
741
|
7
|
50
|
|
|
|
|
if(SvUOK(b)) { |
742
|
0
|
|
|
|
|
|
if((float128)SvUVX(b) == crealq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a))))) && |
743
|
0
|
|
|
|
|
|
0.0Q == cimagq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))))) return newSVuv(0); |
744
|
0
|
|
|
|
|
|
return newSVuv(1); |
745
|
|
|
|
|
|
|
} |
746
|
7
|
50
|
|
|
|
|
if(SvIOK(b)) { |
747
|
0
|
|
|
|
|
|
if((float128)SvIVX(b) == crealq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a))))) && |
748
|
0
|
|
|
|
|
|
0.0Q == cimagq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))))) return newSVuv(0); |
749
|
0
|
|
|
|
|
|
return newSVuv(1); |
750
|
|
|
|
|
|
|
} |
751
|
7
|
50
|
|
|
|
|
if(SvNOK(b)) { |
752
|
0
|
|
|
|
|
|
if((float128)SvNVX(b) == crealq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a))))) && |
753
|
0
|
|
|
|
|
|
0.0Q == cimagq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))))) return newSVuv(0); |
754
|
0
|
|
|
|
|
|
return newSVuv(1); |
755
|
|
|
|
|
|
|
} |
756
|
7
|
100
|
|
|
|
|
if(SvPOK(b)) { |
757
|
2
|
50
|
|
|
|
|
if(!looks_like_number(b)) nnum++; |
758
|
3
|
50
|
|
|
|
|
if(strtoflt128(SvPV_nolen(b), NULL) == crealq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a))))) && |
759
|
2
|
|
|
|
|
|
0.0Q == cimagq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))))) return newSVuv(0); |
760
|
1
|
|
|
|
|
|
return newSVuv(1); |
761
|
|
|
|
|
|
|
} |
762
|
5
|
50
|
|
|
|
|
if(sv_isobject(b)) { |
763
|
5
|
50
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(b))); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
764
|
5
|
50
|
|
|
|
|
if(strEQ(h, "Math::Complex_C::Q")) { |
765
|
5
|
|
|
|
|
|
if(crealq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a))))) == crealq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(b))))) && |
766
|
0
|
|
|
|
|
|
cimagq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a))))) == cimagq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(b)))))) |
767
|
0
|
|
|
|
|
|
return newSVuv(0); |
768
|
5
|
|
|
|
|
|
return newSVuv(1); |
769
|
|
|
|
|
|
|
} |
770
|
|
|
|
|
|
|
} |
771
|
|
|
|
|
|
|
|
772
|
0
|
|
|
|
|
|
croak("Invalid argument supplied to Math::Complex_C::Q::_overload_not_equiv function"); |
773
|
|
|
|
|
|
|
} |
774
|
|
|
|
|
|
|
|
775
|
|
|
|
|
|
|
|
776
|
17
|
|
|
|
|
|
SV * _overload_pow(pTHX_ SV * a, SV * b, SV * third) { |
777
|
|
|
|
|
|
|
#ifdef MINGW_W64_BUGGY |
778
|
|
|
|
|
|
|
croak("** (pow) not overloaded for mingw-w64 compilers"); |
779
|
|
|
|
|
|
|
#else |
780
|
|
|
|
|
|
|
MATH_COMPLEX *pc, t; |
781
|
|
|
|
|
|
|
SV * obj_ref, * obj; |
782
|
|
|
|
|
|
|
|
783
|
17
|
|
|
|
|
|
New(42, pc, 1, MATH_COMPLEX); |
784
|
17
|
50
|
|
|
|
|
if(pc == NULL) croak("Failed to allocate memory in _overload_pow function"); |
785
|
|
|
|
|
|
|
|
786
|
17
|
|
|
|
|
|
obj_ref = newSV(0); |
787
|
17
|
|
|
|
|
|
obj = newSVrv(obj_ref, "Math::Complex_C::Q"); |
788
|
|
|
|
|
|
|
|
789
|
17
|
|
|
|
|
|
sv_setiv(obj, INT2PTR(IV,pc)); |
790
|
17
|
|
|
|
|
|
SvREADONLY_on(obj); |
791
|
|
|
|
|
|
|
|
792
|
17
|
50
|
|
|
|
|
if(SvUOK(b)) { |
793
|
0
|
|
|
|
|
|
__real__ t = (float128)SvUVX(b); |
794
|
0
|
|
|
|
|
|
__imag__ t = 0.0Q; |
795
|
0
|
0
|
|
|
|
|
if(SWITCH_ARGS) { |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
796
|
0
|
|
|
|
|
|
*pc = cpowq( t, *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) ); |
797
|
0
|
|
|
|
|
|
return obj_ref; |
798
|
|
|
|
|
|
|
} |
799
|
0
|
|
|
|
|
|
*pc = cpowq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))), t); |
800
|
0
|
|
|
|
|
|
return obj_ref; |
801
|
|
|
|
|
|
|
} |
802
|
|
|
|
|
|
|
|
803
|
17
|
100
|
|
|
|
|
if(SvIOK(b)) { |
804
|
9
|
|
|
|
|
|
__real__ t = (float128)SvIVX(b); |
805
|
9
|
|
|
|
|
|
__imag__ t = 0.0Q; |
806
|
9
|
50
|
|
|
|
|
if(SWITCH_ARGS) { |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
807
|
3
|
|
|
|
|
|
*pc = cpowq( t, *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) ); |
808
|
3
|
|
|
|
|
|
return obj_ref; |
809
|
|
|
|
|
|
|
} |
810
|
6
|
|
|
|
|
|
*pc = cpowq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))), t); |
811
|
6
|
|
|
|
|
|
return obj_ref; |
812
|
|
|
|
|
|
|
} |
813
|
|
|
|
|
|
|
|
814
|
8
|
100
|
|
|
|
|
if(SvNOK(b)) { |
815
|
3
|
|
|
|
|
|
__real__ t = (float128)SvNVX(b); |
816
|
3
|
|
|
|
|
|
__imag__ t = 0.0Q; |
817
|
3
|
50
|
|
|
|
|
if(SWITCH_ARGS) { |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
818
|
1
|
|
|
|
|
|
*pc = cpowq( t, *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) ); |
819
|
1
|
|
|
|
|
|
return obj_ref; |
820
|
|
|
|
|
|
|
} |
821
|
2
|
|
|
|
|
|
*pc = cpowq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))), t); |
822
|
2
|
|
|
|
|
|
return obj_ref; |
823
|
|
|
|
|
|
|
} |
824
|
|
|
|
|
|
|
|
825
|
5
|
100
|
|
|
|
|
if(SvPOK(b)) { |
826
|
2
|
50
|
|
|
|
|
if(!looks_like_number(b)) nnum++; |
827
|
2
|
50
|
|
|
|
|
__real__ t = strtoflt128(SvPV_nolen(b), NULL); |
828
|
2
|
|
|
|
|
|
__imag__ t = 0.0Q; |
829
|
2
|
50
|
|
|
|
|
if(SWITCH_ARGS) { |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
830
|
1
|
|
|
|
|
|
*pc = cpowq( t, *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) ); |
831
|
1
|
|
|
|
|
|
return obj_ref; |
832
|
|
|
|
|
|
|
} |
833
|
1
|
|
|
|
|
|
*pc = cpowq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))), t); |
834
|
1
|
|
|
|
|
|
return obj_ref; |
835
|
|
|
|
|
|
|
} |
836
|
|
|
|
|
|
|
|
837
|
3
|
50
|
|
|
|
|
else if(sv_isobject(b)) { |
838
|
3
|
50
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(b))); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
839
|
3
|
50
|
|
|
|
|
if(strEQ(h, "Math::Complex_C::Q")) { |
840
|
3
|
|
|
|
|
|
*pc = cpowq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))), *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(b))))); |
841
|
3
|
|
|
|
|
|
return obj_ref; |
842
|
|
|
|
|
|
|
} |
843
|
|
|
|
|
|
|
} |
844
|
0
|
|
|
|
|
|
else croak("Invalid argument supplied to Math::Complex_C::Q::_overload_pow function"); |
845
|
|
|
|
|
|
|
#endif |
846
|
0
|
|
|
|
|
|
} |
847
|
|
|
|
|
|
|
|
848
|
5
|
|
|
|
|
|
SV * _overload_mul(pTHX_ SV * a, SV * b, SV * third) { |
849
|
|
|
|
|
|
|
MATH_COMPLEX *pc; |
850
|
|
|
|
|
|
|
SV * obj_ref, * obj; |
851
|
|
|
|
|
|
|
|
852
|
5
|
|
|
|
|
|
New(42, pc, 1, MATH_COMPLEX); |
853
|
5
|
50
|
|
|
|
|
if(pc == NULL) croak("Failed to allocate memory in _overload_mul function"); |
854
|
|
|
|
|
|
|
|
855
|
5
|
|
|
|
|
|
obj_ref = newSV(0); |
856
|
5
|
|
|
|
|
|
obj = newSVrv(obj_ref, "Math::Complex_C::Q"); |
857
|
|
|
|
|
|
|
|
858
|
5
|
|
|
|
|
|
sv_setiv(obj, INT2PTR(IV,pc)); |
859
|
5
|
|
|
|
|
|
SvREADONLY_on(obj); |
860
|
|
|
|
|
|
|
|
861
|
5
|
50
|
|
|
|
|
if(SvUOK(b)) { |
862
|
0
|
|
|
|
|
|
*pc = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) * (float128)SvUVX(b); |
863
|
0
|
|
|
|
|
|
return obj_ref; |
864
|
|
|
|
|
|
|
} |
865
|
|
|
|
|
|
|
|
866
|
5
|
100
|
|
|
|
|
if(SvIOK(b)) { |
867
|
2
|
|
|
|
|
|
*pc = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) * (float128)SvIVX(b); |
868
|
2
|
|
|
|
|
|
return obj_ref; |
869
|
|
|
|
|
|
|
} |
870
|
|
|
|
|
|
|
|
871
|
3
|
100
|
|
|
|
|
if(SvNOK(b)) { |
872
|
1
|
|
|
|
|
|
*pc = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) * (float128)SvNVX(b); |
873
|
1
|
|
|
|
|
|
return obj_ref; |
874
|
|
|
|
|
|
|
} |
875
|
2
|
100
|
|
|
|
|
if(SvPOK(b)) { |
876
|
1
|
50
|
|
|
|
|
if(!looks_like_number(b)) nnum++; |
877
|
1
|
50
|
|
|
|
|
*pc = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) * strtoflt128(SvPV_nolen(b), NULL); |
878
|
1
|
|
|
|
|
|
return obj_ref; |
879
|
|
|
|
|
|
|
} |
880
|
1
|
50
|
|
|
|
|
if(sv_isobject(b)) { |
881
|
1
|
50
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(b))); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
882
|
1
|
50
|
|
|
|
|
if(strEQ(h, "Math::Complex_C::Q")) { |
883
|
1
|
|
|
|
|
|
*pc = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) * *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(b)))); |
884
|
1
|
|
|
|
|
|
return obj_ref; |
885
|
|
|
|
|
|
|
} |
886
|
|
|
|
|
|
|
} |
887
|
|
|
|
|
|
|
|
888
|
0
|
|
|
|
|
|
croak("Invalid argument supplied to Math::Complex_C::Q::_overload_mul function"); |
889
|
|
|
|
|
|
|
} |
890
|
|
|
|
|
|
|
|
891
|
5
|
|
|
|
|
|
SV * _overload_add(pTHX_ SV * a, SV * b, SV * third) { |
892
|
|
|
|
|
|
|
MATH_COMPLEX *pc; |
893
|
|
|
|
|
|
|
SV * obj_ref, * obj; |
894
|
|
|
|
|
|
|
|
895
|
5
|
|
|
|
|
|
New(42, pc, 1, MATH_COMPLEX); |
896
|
5
|
50
|
|
|
|
|
if(pc == NULL) croak("Failed to allocate memory in _overload_add function"); |
897
|
|
|
|
|
|
|
|
898
|
5
|
|
|
|
|
|
obj_ref = newSV(0); |
899
|
5
|
|
|
|
|
|
obj = newSVrv(obj_ref, "Math::Complex_C::Q"); |
900
|
|
|
|
|
|
|
|
901
|
5
|
|
|
|
|
|
sv_setiv(obj, INT2PTR(IV,pc)); |
902
|
5
|
|
|
|
|
|
SvREADONLY_on(obj); |
903
|
|
|
|
|
|
|
|
904
|
5
|
50
|
|
|
|
|
if(SvUOK(b)) { |
905
|
0
|
|
|
|
|
|
*pc = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) + (float128)SvUVX(b); |
906
|
0
|
|
|
|
|
|
return obj_ref; |
907
|
|
|
|
|
|
|
} |
908
|
|
|
|
|
|
|
|
909
|
5
|
100
|
|
|
|
|
if(SvIOK(b)) { |
910
|
2
|
|
|
|
|
|
*pc = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) + (float128)SvIVX(b); |
911
|
2
|
|
|
|
|
|
return obj_ref; |
912
|
|
|
|
|
|
|
} |
913
|
|
|
|
|
|
|
|
914
|
3
|
100
|
|
|
|
|
if(SvNOK(b)) { |
915
|
1
|
|
|
|
|
|
*pc = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) + (float128)SvNVX(b); |
916
|
1
|
|
|
|
|
|
return obj_ref; |
917
|
|
|
|
|
|
|
} |
918
|
2
|
100
|
|
|
|
|
if(SvPOK(b)) { |
919
|
1
|
50
|
|
|
|
|
if(!looks_like_number(b)) nnum++; |
920
|
1
|
50
|
|
|
|
|
*pc = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) + strtoflt128(SvPV_nolen(b), NULL); |
921
|
1
|
|
|
|
|
|
return obj_ref; |
922
|
|
|
|
|
|
|
} |
923
|
1
|
50
|
|
|
|
|
if(sv_isobject(b)) { |
924
|
1
|
50
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(b))); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
925
|
1
|
50
|
|
|
|
|
if(strEQ(h, "Math::Complex_C::Q")) { |
926
|
1
|
|
|
|
|
|
*pc = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) + *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(b)))); |
927
|
1
|
|
|
|
|
|
return obj_ref; |
928
|
|
|
|
|
|
|
} |
929
|
|
|
|
|
|
|
} |
930
|
|
|
|
|
|
|
|
931
|
0
|
|
|
|
|
|
croak("Invalid argument supplied to Math::Complex_C::Q::_overload_add function"); |
932
|
|
|
|
|
|
|
} |
933
|
|
|
|
|
|
|
|
934
|
9
|
|
|
|
|
|
SV * _overload_div(pTHX_ SV * a, SV * b, SV * third) { |
935
|
|
|
|
|
|
|
MATH_COMPLEX *pc; |
936
|
|
|
|
|
|
|
SV * obj_ref, * obj; |
937
|
|
|
|
|
|
|
|
938
|
9
|
|
|
|
|
|
New(42, pc, 1, MATH_COMPLEX); |
939
|
9
|
50
|
|
|
|
|
if(pc == NULL) croak("Failed to allocate memory in _overload_div function"); |
940
|
|
|
|
|
|
|
|
941
|
9
|
|
|
|
|
|
obj_ref = newSV(0); |
942
|
9
|
|
|
|
|
|
obj = newSVrv(obj_ref, "Math::Complex_C::Q"); |
943
|
|
|
|
|
|
|
|
944
|
9
|
|
|
|
|
|
sv_setiv(obj, INT2PTR(IV,pc)); |
945
|
9
|
|
|
|
|
|
SvREADONLY_on(obj); |
946
|
|
|
|
|
|
|
|
947
|
9
|
50
|
|
|
|
|
if(SvUOK(b)) { |
948
|
0
|
0
|
|
|
|
|
if(SWITCH_ARGS) *pc = (float128)SvUVX(b) / *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
949
|
0
|
|
|
|
|
|
else *pc = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) / (float128)SvUVX(b); |
950
|
0
|
|
|
|
|
|
return obj_ref; |
951
|
|
|
|
|
|
|
} |
952
|
|
|
|
|
|
|
|
953
|
9
|
100
|
|
|
|
|
if(SvIOK(b)) { |
954
|
4
|
50
|
|
|
|
|
if(SWITCH_ARGS) *pc = (float128)SvIVX(b) / *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
955
|
3
|
|
|
|
|
|
else *pc = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) / (float128)SvIVX(b); |
956
|
4
|
|
|
|
|
|
return obj_ref; |
957
|
|
|
|
|
|
|
} |
958
|
|
|
|
|
|
|
|
959
|
5
|
100
|
|
|
|
|
if(SvNOK(b)) { |
960
|
1
|
50
|
|
|
|
|
if(SWITCH_ARGS) *pc = (float128)SvNVX(b) / *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
961
|
1
|
|
|
|
|
|
else *pc = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) / (float128)SvNVX(b); |
962
|
1
|
|
|
|
|
|
return obj_ref; |
963
|
|
|
|
|
|
|
} |
964
|
4
|
100
|
|
|
|
|
if(SvPOK(b)) { |
965
|
2
|
50
|
|
|
|
|
if(!looks_like_number(b)) nnum++; |
966
|
2
|
50
|
|
|
|
|
if(SWITCH_ARGS) *pc = strtoflt128(SvPV_nolen(b), NULL) / *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
967
|
1
|
50
|
|
|
|
|
else *pc = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) / strtoflt128(SvPV_nolen(b), NULL); |
968
|
2
|
|
|
|
|
|
return obj_ref; |
969
|
|
|
|
|
|
|
} |
970
|
2
|
50
|
|
|
|
|
if(sv_isobject(b)) { |
971
|
2
|
50
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(b))); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
972
|
2
|
50
|
|
|
|
|
if(strEQ(h, "Math::Complex_C::Q")) { |
973
|
2
|
|
|
|
|
|
*pc = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) / *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(b)))); |
974
|
2
|
|
|
|
|
|
return obj_ref; |
975
|
|
|
|
|
|
|
} |
976
|
|
|
|
|
|
|
} |
977
|
|
|
|
|
|
|
|
978
|
0
|
|
|
|
|
|
croak("Invalid argument supplied to Math::Complex_C::Q::_overload_div function"); |
979
|
|
|
|
|
|
|
} |
980
|
|
|
|
|
|
|
|
981
|
8
|
|
|
|
|
|
SV * _overload_sub(pTHX_ SV * a, SV * b, SV * third) { |
982
|
|
|
|
|
|
|
MATH_COMPLEX *pc; |
983
|
|
|
|
|
|
|
SV * obj_ref, * obj; |
984
|
|
|
|
|
|
|
|
985
|
8
|
|
|
|
|
|
New(42, pc, 1, MATH_COMPLEX); |
986
|
8
|
50
|
|
|
|
|
if(pc == NULL) croak("Failed to allocate memory in _overload_sub function"); |
987
|
|
|
|
|
|
|
|
988
|
8
|
|
|
|
|
|
obj_ref = newSV(0); |
989
|
8
|
|
|
|
|
|
obj = newSVrv(obj_ref, "Math::Complex_C::Q"); |
990
|
|
|
|
|
|
|
|
991
|
8
|
|
|
|
|
|
sv_setiv(obj, INT2PTR(IV,pc)); |
992
|
8
|
|
|
|
|
|
SvREADONLY_on(obj); |
993
|
|
|
|
|
|
|
|
994
|
8
|
50
|
|
|
|
|
if(SvUOK(b)) { |
995
|
0
|
0
|
|
|
|
|
if(SWITCH_ARGS) *pc = (float128)SvUVX(b) - *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
996
|
0
|
|
|
|
|
|
else *pc = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) - (float128)SvUVX(b); |
997
|
0
|
|
|
|
|
|
return obj_ref; |
998
|
|
|
|
|
|
|
} |
999
|
|
|
|
|
|
|
|
1000
|
8
|
100
|
|
|
|
|
if(SvIOK(b)) { |
1001
|
4
|
50
|
|
|
|
|
if(SWITCH_ARGS) *pc = (float128)SvIVX(b) - *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
1002
|
3
|
|
|
|
|
|
else *pc = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) - (float128)SvIVX(b); |
1003
|
4
|
|
|
|
|
|
return obj_ref; |
1004
|
|
|
|
|
|
|
} |
1005
|
|
|
|
|
|
|
|
1006
|
4
|
100
|
|
|
|
|
if(SvNOK(b)) { |
1007
|
1
|
50
|
|
|
|
|
if(SWITCH_ARGS) *pc = (float128)SvNVX(b) - *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
1008
|
1
|
|
|
|
|
|
else *pc = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) - (float128)SvNVX(b); |
1009
|
1
|
|
|
|
|
|
return obj_ref; |
1010
|
|
|
|
|
|
|
} |
1011
|
3
|
100
|
|
|
|
|
if(SvPOK(b)) { |
1012
|
2
|
50
|
|
|
|
|
if(!looks_like_number(b)) nnum++; |
1013
|
2
|
50
|
|
|
|
|
if(SWITCH_ARGS) *pc = strtoflt128(SvPV_nolen(b), NULL) - *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
1014
|
1
|
50
|
|
|
|
|
else *pc = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) - strtoflt128(SvPV_nolen(b), NULL); |
1015
|
2
|
|
|
|
|
|
return obj_ref; |
1016
|
|
|
|
|
|
|
} |
1017
|
1
|
50
|
|
|
|
|
if(sv_isobject(b)) { |
1018
|
1
|
50
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(b))); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
1019
|
1
|
50
|
|
|
|
|
if(strEQ(h, "Math::Complex_C::Q")) { |
1020
|
1
|
|
|
|
|
|
*pc = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) - *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(b)))); |
1021
|
1
|
|
|
|
|
|
return obj_ref; |
1022
|
|
|
|
|
|
|
} |
1023
|
|
|
|
|
|
|
} |
1024
|
|
|
|
|
|
|
|
1025
|
0
|
|
|
|
|
|
croak("Invalid argument supplied to Math::Complex_C::Q::_overload_sub function"); |
1026
|
|
|
|
|
|
|
} |
1027
|
|
|
|
|
|
|
|
1028
|
1
|
|
|
|
|
|
SV * _overload_sqrt(pTHX_ SV * a, SV * b, SV * third) { |
1029
|
|
|
|
|
|
|
MATH_COMPLEX *pc; |
1030
|
|
|
|
|
|
|
SV * obj_ref, * obj; |
1031
|
|
|
|
|
|
|
|
1032
|
1
|
|
|
|
|
|
New(42, pc, 1, MATH_COMPLEX); |
1033
|
1
|
50
|
|
|
|
|
if(pc == NULL) croak("Failed to allocate memory in _overload_sqrt function"); |
1034
|
|
|
|
|
|
|
|
1035
|
1
|
|
|
|
|
|
obj_ref = newSV(0); |
1036
|
1
|
|
|
|
|
|
obj = newSVrv(obj_ref, "Math::Complex_C::Q"); |
1037
|
|
|
|
|
|
|
|
1038
|
1
|
|
|
|
|
|
*pc = csqrtq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a))))); |
1039
|
|
|
|
|
|
|
|
1040
|
1
|
|
|
|
|
|
sv_setiv(obj, INT2PTR(IV,pc)); |
1041
|
1
|
|
|
|
|
|
SvREADONLY_on(obj); |
1042
|
1
|
|
|
|
|
|
return obj_ref; |
1043
|
|
|
|
|
|
|
} |
1044
|
|
|
|
|
|
|
|
1045
|
4
|
|
|
|
|
|
SV * _overload_pow_eq(pTHX_ SV * a, SV * b, SV * third) { |
1046
|
|
|
|
|
|
|
#ifdef MINGW_W64_BUGGY |
1047
|
|
|
|
|
|
|
croak("**= (pow-equal) not overloaded for mingw-w64 compilers"); |
1048
|
|
|
|
|
|
|
#else |
1049
|
|
|
|
|
|
|
MATH_COMPLEX t; |
1050
|
4
|
|
|
|
|
|
SvREFCNT_inc(a); |
1051
|
|
|
|
|
|
|
|
1052
|
4
|
50
|
|
|
|
|
if(SvUOK(b)) { |
1053
|
0
|
|
|
|
|
|
__real__ t = (float128)SvUVX(b); |
1054
|
0
|
|
|
|
|
|
__imag__ t = 0.0Q; |
1055
|
0
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) = cpowq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))), t); |
1056
|
0
|
|
|
|
|
|
return a; |
1057
|
|
|
|
|
|
|
} |
1058
|
4
|
100
|
|
|
|
|
if(SvIOK(b)) { |
1059
|
3
|
|
|
|
|
|
__real__ t = (float128)SvIVX(b); |
1060
|
3
|
|
|
|
|
|
__imag__ t = 0.0Q; |
1061
|
3
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) = cpowq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))), t); |
1062
|
3
|
|
|
|
|
|
return a; |
1063
|
|
|
|
|
|
|
} |
1064
|
1
|
50
|
|
|
|
|
if(SvNOK(b)) { |
1065
|
1
|
|
|
|
|
|
__real__ t = (float128)SvNVX(b); |
1066
|
1
|
|
|
|
|
|
__imag__ t = 0.0Q; |
1067
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) = cpowq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))), t); |
1068
|
1
|
|
|
|
|
|
return a; |
1069
|
|
|
|
|
|
|
} |
1070
|
0
|
0
|
|
|
|
|
if(SvPOK(b)) { |
1071
|
0
|
0
|
|
|
|
|
if(!looks_like_number(b)) nnum++; |
1072
|
0
|
0
|
|
|
|
|
__real__ t = strtoflt128(SvPV_nolen(b), NULL); |
1073
|
0
|
|
|
|
|
|
__imag__ t = 0.0Q; |
1074
|
0
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) = cpowq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))), t); |
1075
|
0
|
|
|
|
|
|
return a; |
1076
|
|
|
|
|
|
|
} |
1077
|
0
|
0
|
|
|
|
|
if(sv_isobject(b)) { |
1078
|
0
|
0
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(b))); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1079
|
0
|
0
|
|
|
|
|
if(strEQ(h, "Math::Complex_C::Q")) { |
1080
|
0
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) = cpowq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))), |
1081
|
0
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(b))))); |
1082
|
0
|
|
|
|
|
|
return a; |
1083
|
|
|
|
|
|
|
} |
1084
|
|
|
|
|
|
|
} |
1085
|
0
|
|
|
|
|
|
SvREFCNT_dec(a); |
1086
|
0
|
|
|
|
|
|
croak("Invalid argument supplied to Math::Complex_C::Q::_overload_pow_eq function"); |
1087
|
|
|
|
|
|
|
#endif |
1088
|
|
|
|
|
|
|
} |
1089
|
|
|
|
|
|
|
|
1090
|
7
|
|
|
|
|
|
SV * _overload_mul_eq(pTHX_ SV * a, SV * b, SV * third) { |
1091
|
7
|
|
|
|
|
|
SvREFCNT_inc(a); |
1092
|
|
|
|
|
|
|
|
1093
|
7
|
50
|
|
|
|
|
if(SvUOK(b)) { |
1094
|
0
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) *= (float128)SvUVX(b); |
1095
|
0
|
|
|
|
|
|
return a; |
1096
|
|
|
|
|
|
|
} |
1097
|
|
|
|
|
|
|
|
1098
|
7
|
100
|
|
|
|
|
if(SvIOK(b)) { |
1099
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) *= (float128)SvIVX(b); |
1100
|
2
|
|
|
|
|
|
return a; |
1101
|
|
|
|
|
|
|
} |
1102
|
|
|
|
|
|
|
|
1103
|
5
|
100
|
|
|
|
|
if(SvNOK(b)) { |
1104
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) *= (float128)SvNVX(b); |
1105
|
1
|
|
|
|
|
|
return a; |
1106
|
|
|
|
|
|
|
} |
1107
|
|
|
|
|
|
|
|
1108
|
4
|
100
|
|
|
|
|
if(SvPOK(b)) { |
1109
|
2
|
100
|
|
|
|
|
if(!looks_like_number(b)) nnum++; |
1110
|
2
|
50
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) *= strtoflt128(SvPV_nolen(b), NULL); |
1111
|
2
|
|
|
|
|
|
return a; |
1112
|
|
|
|
|
|
|
} |
1113
|
|
|
|
|
|
|
|
1114
|
2
|
50
|
|
|
|
|
if(sv_isobject(b)) { |
1115
|
2
|
50
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(b))); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
1116
|
2
|
50
|
|
|
|
|
if(strEQ(h, "Math::Complex_C::Q")) { |
1117
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) *= *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(b)))); |
1118
|
2
|
|
|
|
|
|
return a; |
1119
|
|
|
|
|
|
|
} |
1120
|
|
|
|
|
|
|
} |
1121
|
|
|
|
|
|
|
|
1122
|
0
|
|
|
|
|
|
SvREFCNT_dec(a); |
1123
|
0
|
|
|
|
|
|
croak("Invalid argument supplied to Math::Complex_C::Q::_overload_mul_eq function"); |
1124
|
|
|
|
|
|
|
} |
1125
|
|
|
|
|
|
|
|
1126
|
6
|
|
|
|
|
|
SV * _overload_add_eq(pTHX_ SV * a, SV * b, SV * third) { |
1127
|
6
|
|
|
|
|
|
SvREFCNT_inc(a); |
1128
|
|
|
|
|
|
|
|
1129
|
6
|
50
|
|
|
|
|
if(SvUOK(b)) { |
1130
|
0
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) += (float128)SvUVX(b); |
1131
|
0
|
|
|
|
|
|
return a; |
1132
|
|
|
|
|
|
|
} |
1133
|
|
|
|
|
|
|
|
1134
|
6
|
100
|
|
|
|
|
if(SvIOK(b)) { |
1135
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) += (float128)SvIVX(b); |
1136
|
2
|
|
|
|
|
|
return a; |
1137
|
|
|
|
|
|
|
} |
1138
|
|
|
|
|
|
|
|
1139
|
4
|
100
|
|
|
|
|
if(SvNOK(b)) { |
1140
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) += (float128)SvNVX(b); |
1141
|
1
|
|
|
|
|
|
return a; |
1142
|
|
|
|
|
|
|
} |
1143
|
|
|
|
|
|
|
|
1144
|
3
|
100
|
|
|
|
|
if(SvPOK(b)) { |
1145
|
1
|
50
|
|
|
|
|
if(!looks_like_number(b)) nnum++; |
1146
|
1
|
50
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) += strtoflt128(SvPV_nolen(b), NULL); |
1147
|
1
|
|
|
|
|
|
return a; |
1148
|
|
|
|
|
|
|
} |
1149
|
|
|
|
|
|
|
|
1150
|
2
|
50
|
|
|
|
|
if(sv_isobject(b)) { |
1151
|
2
|
50
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(b))); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
1152
|
2
|
50
|
|
|
|
|
if(strEQ(h, "Math::Complex_C::Q")) { |
1153
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) += *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(b)))); |
1154
|
2
|
|
|
|
|
|
return a; |
1155
|
|
|
|
|
|
|
} |
1156
|
|
|
|
|
|
|
} |
1157
|
|
|
|
|
|
|
|
1158
|
0
|
|
|
|
|
|
SvREFCNT_dec(a); |
1159
|
0
|
|
|
|
|
|
croak("Invalid argument supplied to Math::Complex_C::Q::_overload_add_eq function"); |
1160
|
|
|
|
|
|
|
} |
1161
|
|
|
|
|
|
|
|
1162
|
5
|
|
|
|
|
|
SV * _overload_div_eq(pTHX_ SV * a, SV * b, SV * third) { |
1163
|
5
|
|
|
|
|
|
SvREFCNT_inc(a); |
1164
|
|
|
|
|
|
|
|
1165
|
5
|
50
|
|
|
|
|
if(SvUOK(b)) { |
1166
|
0
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) /= (float128)SvUVX(b); |
1167
|
0
|
|
|
|
|
|
return a; |
1168
|
|
|
|
|
|
|
} |
1169
|
|
|
|
|
|
|
|
1170
|
5
|
100
|
|
|
|
|
if(SvIOK(b)) { |
1171
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) /= (float128)SvIVX(b); |
1172
|
2
|
|
|
|
|
|
return a; |
1173
|
|
|
|
|
|
|
} |
1174
|
|
|
|
|
|
|
|
1175
|
3
|
100
|
|
|
|
|
if(SvNOK(b)) { |
1176
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) /= (float128)SvNVX(b); |
1177
|
1
|
|
|
|
|
|
return a; |
1178
|
|
|
|
|
|
|
} |
1179
|
|
|
|
|
|
|
|
1180
|
2
|
100
|
|
|
|
|
if(SvPOK(b)) { |
1181
|
1
|
50
|
|
|
|
|
if(!looks_like_number(b)) nnum++; |
1182
|
1
|
50
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) /= strtoflt128(SvPV_nolen(b), NULL); |
1183
|
1
|
|
|
|
|
|
return a; |
1184
|
|
|
|
|
|
|
} |
1185
|
|
|
|
|
|
|
|
1186
|
1
|
50
|
|
|
|
|
if(sv_isobject(b)) { |
1187
|
1
|
50
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(b))); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
1188
|
1
|
50
|
|
|
|
|
if(strEQ(h, "Math::Complex_C::Q")) { |
1189
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) /= *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(b)))); |
1190
|
1
|
|
|
|
|
|
return a; |
1191
|
|
|
|
|
|
|
} |
1192
|
|
|
|
|
|
|
} |
1193
|
|
|
|
|
|
|
|
1194
|
0
|
|
|
|
|
|
SvREFCNT_dec(a); |
1195
|
0
|
|
|
|
|
|
croak("Invalid argument supplied to Math::Complex_C::Q::_overload_div_eq function"); |
1196
|
|
|
|
|
|
|
} |
1197
|
|
|
|
|
|
|
|
1198
|
5
|
|
|
|
|
|
SV * _overload_sub_eq(pTHX_ SV * a, SV * b, SV * third) { |
1199
|
5
|
|
|
|
|
|
SvREFCNT_inc(a); |
1200
|
|
|
|
|
|
|
|
1201
|
5
|
50
|
|
|
|
|
if(SvUOK(b)) { |
1202
|
0
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) -= (float128)SvUVX(b); |
1203
|
0
|
|
|
|
|
|
return a; |
1204
|
|
|
|
|
|
|
} |
1205
|
|
|
|
|
|
|
|
1206
|
5
|
100
|
|
|
|
|
if(SvIOK(b)) { |
1207
|
2
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) -= (float128)SvIVX(b); |
1208
|
2
|
|
|
|
|
|
return a; |
1209
|
|
|
|
|
|
|
} |
1210
|
|
|
|
|
|
|
|
1211
|
3
|
100
|
|
|
|
|
if(SvNOK(b)) { |
1212
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) -= (float128)SvNVX(b); |
1213
|
1
|
|
|
|
|
|
return a; |
1214
|
|
|
|
|
|
|
} |
1215
|
|
|
|
|
|
|
|
1216
|
2
|
100
|
|
|
|
|
if(SvPOK(b)) { |
1217
|
1
|
50
|
|
|
|
|
if(!looks_like_number(b)) nnum++; |
1218
|
1
|
50
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) -= strtoflt128(SvPV_nolen(b), NULL); |
1219
|
1
|
|
|
|
|
|
return a; |
1220
|
|
|
|
|
|
|
} |
1221
|
|
|
|
|
|
|
|
1222
|
1
|
50
|
|
|
|
|
if(sv_isobject(b)) { |
1223
|
1
|
50
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(b))); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
1224
|
1
|
50
|
|
|
|
|
if(strEQ(h, "Math::Complex_C::Q")) { |
1225
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) -= *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(b)))); |
1226
|
1
|
|
|
|
|
|
return a; |
1227
|
|
|
|
|
|
|
} |
1228
|
|
|
|
|
|
|
} |
1229
|
|
|
|
|
|
|
|
1230
|
0
|
|
|
|
|
|
SvREFCNT_dec(a); |
1231
|
0
|
|
|
|
|
|
croak("Invalid argument supplied to Math::Complex_C::Q::_overload_sub_eq function"); |
1232
|
|
|
|
|
|
|
} |
1233
|
|
|
|
|
|
|
|
1234
|
4
|
|
|
|
|
|
SV * _overload_copy(pTHX_ SV * a, SV * second, SV * third) { |
1235
|
|
|
|
|
|
|
|
1236
|
|
|
|
|
|
|
MATH_COMPLEX *pc; |
1237
|
|
|
|
|
|
|
SV * obj_ref, * obj; |
1238
|
|
|
|
|
|
|
|
1239
|
4
|
|
|
|
|
|
New(42, pc, 1, MATH_COMPLEX); |
1240
|
4
|
50
|
|
|
|
|
if(pc == NULL) croak("Failed to allocate memory in _overload_copy function"); |
1241
|
|
|
|
|
|
|
|
1242
|
4
|
|
|
|
|
|
obj_ref = newSV(0); |
1243
|
4
|
|
|
|
|
|
obj = newSVrv(obj_ref, "Math::Complex_C::Q"); |
1244
|
|
|
|
|
|
|
|
1245
|
4
|
|
|
|
|
|
__real__ *pc = __real__ *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))); |
1246
|
4
|
|
|
|
|
|
__imag__ *pc = __imag__ *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))); |
1247
|
|
|
|
|
|
|
|
1248
|
4
|
|
|
|
|
|
sv_setiv(obj, INT2PTR(IV,pc)); |
1249
|
4
|
|
|
|
|
|
SvREADONLY_on(obj); |
1250
|
4
|
|
|
|
|
|
return obj_ref; |
1251
|
|
|
|
|
|
|
|
1252
|
|
|
|
|
|
|
} |
1253
|
|
|
|
|
|
|
|
1254
|
1
|
|
|
|
|
|
SV * _overload_abs(pTHX_ SV * rop, SV * second, SV * third) { |
1255
|
1
|
|
|
|
|
|
return newSVnv(cabsq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(rop)))))); |
1256
|
|
|
|
|
|
|
} |
1257
|
|
|
|
|
|
|
|
1258
|
1
|
|
|
|
|
|
SV * _overload_exp(pTHX_ SV * a, SV * b, SV * third) { |
1259
|
|
|
|
|
|
|
#ifdef MINGW_W64_BUGGY |
1260
|
|
|
|
|
|
|
croak("exp not overloaded with mingw-w64 compilers"); |
1261
|
|
|
|
|
|
|
#else |
1262
|
|
|
|
|
|
|
MATH_COMPLEX *pc; |
1263
|
|
|
|
|
|
|
SV * obj_ref, * obj; |
1264
|
|
|
|
|
|
|
|
1265
|
1
|
|
|
|
|
|
New(42, pc, 1, MATH_COMPLEX); |
1266
|
1
|
50
|
|
|
|
|
if(pc == NULL) croak("Failed to allocate memory in _overload_exp function"); |
1267
|
|
|
|
|
|
|
|
1268
|
1
|
|
|
|
|
|
obj_ref = newSV(0); |
1269
|
1
|
|
|
|
|
|
obj = newSVrv(obj_ref, "Math::Complex_C::Q"); |
1270
|
|
|
|
|
|
|
|
1271
|
1
|
|
|
|
|
|
*pc = cexpq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a))))); |
1272
|
|
|
|
|
|
|
|
1273
|
1
|
|
|
|
|
|
sv_setiv(obj, INT2PTR(IV,pc)); |
1274
|
1
|
|
|
|
|
|
SvREADONLY_on(obj); |
1275
|
1
|
|
|
|
|
|
return obj_ref; |
1276
|
|
|
|
|
|
|
#endif |
1277
|
|
|
|
|
|
|
} |
1278
|
|
|
|
|
|
|
|
1279
|
1
|
|
|
|
|
|
SV * _overload_log(pTHX_ SV * a, SV * b, SV * third) { |
1280
|
|
|
|
|
|
|
MATH_COMPLEX *pc; |
1281
|
|
|
|
|
|
|
SV * obj_ref, * obj; |
1282
|
|
|
|
|
|
|
|
1283
|
1
|
|
|
|
|
|
New(42, pc, 1, MATH_COMPLEX); |
1284
|
1
|
50
|
|
|
|
|
if(pc == NULL) croak("Failed to allocate memory in _overload_log function"); |
1285
|
|
|
|
|
|
|
|
1286
|
1
|
|
|
|
|
|
obj_ref = newSV(0); |
1287
|
1
|
|
|
|
|
|
obj = newSVrv(obj_ref, "Math::Complex_C::Q"); |
1288
|
|
|
|
|
|
|
|
1289
|
1
|
|
|
|
|
|
*pc = clogq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a))))); |
1290
|
|
|
|
|
|
|
|
1291
|
1
|
|
|
|
|
|
sv_setiv(obj, INT2PTR(IV,pc)); |
1292
|
1
|
|
|
|
|
|
SvREADONLY_on(obj); |
1293
|
1
|
|
|
|
|
|
return obj_ref; |
1294
|
|
|
|
|
|
|
} |
1295
|
|
|
|
|
|
|
|
1296
|
1
|
|
|
|
|
|
SV * _overload_sin(pTHX_ SV * a, SV * b, SV * third) { |
1297
|
|
|
|
|
|
|
#ifdef MINGW_W64_BUGGY |
1298
|
|
|
|
|
|
|
croak("sin not overloaded for mingw-w64 compilers"); |
1299
|
|
|
|
|
|
|
#else |
1300
|
|
|
|
|
|
|
MATH_COMPLEX *pc; |
1301
|
|
|
|
|
|
|
SV * obj_ref, * obj; |
1302
|
|
|
|
|
|
|
|
1303
|
1
|
|
|
|
|
|
New(42, pc, 1, MATH_COMPLEX); |
1304
|
1
|
50
|
|
|
|
|
if(pc == NULL) croak("Failed to allocate memory in _overload_sin function"); |
1305
|
|
|
|
|
|
|
|
1306
|
1
|
|
|
|
|
|
obj_ref = newSV(0); |
1307
|
1
|
|
|
|
|
|
obj = newSVrv(obj_ref, "Math::Complex_C::Q"); |
1308
|
|
|
|
|
|
|
|
1309
|
1
|
|
|
|
|
|
*pc = csinq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a))))); |
1310
|
|
|
|
|
|
|
|
1311
|
1
|
|
|
|
|
|
sv_setiv(obj, INT2PTR(IV,pc)); |
1312
|
1
|
|
|
|
|
|
SvREADONLY_on(obj); |
1313
|
1
|
|
|
|
|
|
return obj_ref; |
1314
|
|
|
|
|
|
|
#endif |
1315
|
|
|
|
|
|
|
} |
1316
|
|
|
|
|
|
|
|
1317
|
1
|
|
|
|
|
|
SV * _overload_cos(pTHX_ SV * a, SV * b, SV * third) { |
1318
|
|
|
|
|
|
|
#ifdef MINGW_W64_BUGGY |
1319
|
|
|
|
|
|
|
croak("cos not overloaded for mingw-w64 compilers"); |
1320
|
|
|
|
|
|
|
#else |
1321
|
|
|
|
|
|
|
MATH_COMPLEX *pc; |
1322
|
|
|
|
|
|
|
SV * obj_ref, * obj; |
1323
|
|
|
|
|
|
|
|
1324
|
1
|
|
|
|
|
|
New(42, pc, 1, MATH_COMPLEX); |
1325
|
1
|
50
|
|
|
|
|
if(pc == NULL) croak("Failed to allocate memory in _overload_cos function"); |
1326
|
|
|
|
|
|
|
|
1327
|
1
|
|
|
|
|
|
obj_ref = newSV(0); |
1328
|
1
|
|
|
|
|
|
obj = newSVrv(obj_ref, "Math::Complex_C::Q"); |
1329
|
|
|
|
|
|
|
|
1330
|
1
|
|
|
|
|
|
*pc = ccosq(*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a))))); |
1331
|
|
|
|
|
|
|
|
1332
|
1
|
|
|
|
|
|
sv_setiv(obj, INT2PTR(IV,pc)); |
1333
|
1
|
|
|
|
|
|
SvREADONLY_on(obj); |
1334
|
1
|
|
|
|
|
|
return obj_ref; |
1335
|
|
|
|
|
|
|
#endif |
1336
|
|
|
|
|
|
|
} |
1337
|
|
|
|
|
|
|
|
1338
|
1
|
|
|
|
|
|
SV * _overload_atan2(pTHX_ SV * a, SV * b, SV * third) { |
1339
|
|
|
|
|
|
|
MATH_COMPLEX *pc; |
1340
|
|
|
|
|
|
|
SV * obj_ref, * obj; |
1341
|
|
|
|
|
|
|
|
1342
|
1
|
|
|
|
|
|
New(42, pc, 1, MATH_COMPLEX); |
1343
|
1
|
50
|
|
|
|
|
if(pc == NULL) croak("Failed to allocate memory in _overload_atan2 function"); |
1344
|
|
|
|
|
|
|
|
1345
|
1
|
|
|
|
|
|
obj_ref = newSV(0); |
1346
|
1
|
|
|
|
|
|
obj = newSVrv(obj_ref, "Math::Complex_C::Q"); |
1347
|
|
|
|
|
|
|
|
1348
|
2
|
|
|
|
|
|
*pc = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(a)))) / |
1349
|
1
|
|
|
|
|
|
*(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(b)))) ; |
1350
|
|
|
|
|
|
|
|
1351
|
1
|
|
|
|
|
|
*pc = catanq(*pc); |
1352
|
|
|
|
|
|
|
|
1353
|
1
|
|
|
|
|
|
sv_setiv(obj, INT2PTR(IV,pc)); |
1354
|
1
|
|
|
|
|
|
SvREADONLY_on(obj); |
1355
|
1
|
|
|
|
|
|
return obj_ref; |
1356
|
|
|
|
|
|
|
} |
1357
|
|
|
|
|
|
|
|
1358
|
4
|
|
|
|
|
|
SV * get_nanq(pTHX) { |
1359
|
4
|
|
|
|
|
|
return newSVnv(_get_nan()); |
1360
|
|
|
|
|
|
|
} |
1361
|
|
|
|
|
|
|
|
1362
|
2
|
|
|
|
|
|
SV * get_infq(pTHX) { |
1363
|
2
|
|
|
|
|
|
return newSVnv(_get_inf()); |
1364
|
|
|
|
|
|
|
} |
1365
|
|
|
|
|
|
|
|
1366
|
0
|
|
|
|
|
|
SV * get_neg_infq(pTHX) { |
1367
|
0
|
|
|
|
|
|
return newSVnv(_get_neg_inf()); |
1368
|
|
|
|
|
|
|
} |
1369
|
|
|
|
|
|
|
|
1370
|
0
|
|
|
|
|
|
SV * _complex_type(pTHX) { |
1371
|
0
|
|
|
|
|
|
return newSVpv("__complex128", 0); |
1372
|
|
|
|
|
|
|
} |
1373
|
|
|
|
|
|
|
|
1374
|
0
|
|
|
|
|
|
SV * _double_type(pTHX) { |
1375
|
0
|
|
|
|
|
|
return newSVpv("__float128", 0); |
1376
|
|
|
|
|
|
|
} |
1377
|
|
|
|
|
|
|
|
1378
|
0
|
|
|
|
|
|
SV * _get_nv(pTHX_ SV * x) { |
1379
|
0
|
0
|
|
|
|
|
return newSVnv(SvNV(x)); |
1380
|
|
|
|
|
|
|
} |
1381
|
|
|
|
|
|
|
|
1382
|
0
|
|
|
|
|
|
SV * _which_package(pTHX_ SV * b) { |
1383
|
0
|
0
|
|
|
|
|
if(sv_isobject(b)) return newSVpv(HvNAME(SvSTASH(SvRV(b))), 0); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1384
|
0
|
|
|
|
|
|
return newSVpv("Not an object", 0); |
1385
|
|
|
|
|
|
|
} |
1386
|
|
|
|
|
|
|
|
1387
|
0
|
|
|
|
|
|
SV * _wrap_count(pTHX) { |
1388
|
0
|
|
|
|
|
|
return newSVuv(PL_sv_count); |
1389
|
|
|
|
|
|
|
} |
1390
|
|
|
|
|
|
|
|
1391
|
0
|
|
|
|
|
|
SV * _ivsize(pTHX) { |
1392
|
0
|
|
|
|
|
|
return newSViv(sizeof(IV)); |
1393
|
|
|
|
|
|
|
} |
1394
|
|
|
|
|
|
|
|
1395
|
0
|
|
|
|
|
|
SV * _nvsize(pTHX) { |
1396
|
0
|
|
|
|
|
|
return newSViv(sizeof(NV)); |
1397
|
|
|
|
|
|
|
} |
1398
|
|
|
|
|
|
|
|
1399
|
0
|
|
|
|
|
|
SV * _doublesize(pTHX) { |
1400
|
0
|
|
|
|
|
|
return newSViv(sizeof(double)); |
1401
|
|
|
|
|
|
|
} |
1402
|
|
|
|
|
|
|
|
1403
|
0
|
|
|
|
|
|
SV * _longdoublesize(pTHX) { |
1404
|
0
|
|
|
|
|
|
return newSViv(sizeof(long double)); |
1405
|
|
|
|
|
|
|
} |
1406
|
|
|
|
|
|
|
|
1407
|
0
|
|
|
|
|
|
SV * _float128size(pTHX) { |
1408
|
0
|
|
|
|
|
|
return newSViv(sizeof(float128)); |
1409
|
|
|
|
|
|
|
} |
1410
|
|
|
|
|
|
|
|
1411
|
0
|
|
|
|
|
|
SV * _double_Complexsize(pTHX) { |
1412
|
0
|
|
|
|
|
|
return newSViv(sizeof(double _Complex)); |
1413
|
|
|
|
|
|
|
} |
1414
|
|
|
|
|
|
|
|
1415
|
0
|
|
|
|
|
|
SV * _longdouble_Complexsize(pTHX) { |
1416
|
0
|
|
|
|
|
|
return newSViv(sizeof(long double _Complex)); |
1417
|
|
|
|
|
|
|
} |
1418
|
|
|
|
|
|
|
|
1419
|
|
|
|
|
|
|
|
1420
|
0
|
|
|
|
|
|
SV * _float128_Complexsize(pTHX) { |
1421
|
0
|
|
|
|
|
|
return newSViv(sizeof(complex128)); |
1422
|
|
|
|
|
|
|
} |
1423
|
|
|
|
|
|
|
|
1424
|
13
|
|
|
|
|
|
void _q_to_str(pTHX_ SV * ld) { |
1425
|
13
|
|
|
|
|
|
dXSARGS; |
1426
|
|
|
|
|
|
|
MATH_COMPLEX t; |
1427
|
|
|
|
|
|
|
char *rbuffer; |
1428
|
|
|
|
|
|
|
int query; |
1429
|
|
|
|
|
|
|
|
1430
|
13
|
50
|
|
|
|
|
if(sv_isobject(ld)) { |
1431
|
13
|
50
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(ld))); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
1432
|
13
|
50
|
|
|
|
|
if(strEQ(h, "Math::Complex_C::Q")) { |
1433
|
13
|
50
|
|
|
|
|
EXTEND(SP, 2); |
1434
|
|
|
|
|
|
|
|
1435
|
13
|
|
|
|
|
|
t = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(ld)))); |
1436
|
|
|
|
|
|
|
/**/ |
1437
|
13
|
|
|
|
|
|
Newx(rbuffer, 15 + _MATH_COMPLEX_C_Q_DIGITS, char); |
1438
|
13
|
50
|
|
|
|
|
if(rbuffer == NULL) croak("Failed to allocate memory in q_to_str"); |
1439
|
|
|
|
|
|
|
|
1440
|
13
|
|
|
|
|
|
query = _is_inf(__real__ t); |
1441
|
13
|
100
|
|
|
|
|
if(query || _is_nan(__real__ t)) |
|
|
100
|
|
|
|
|
|
1442
|
9
|
100
|
|
|
|
|
sprintf(rbuffer, "%s", query ? query > 0 ? "inf" |
1443
|
2
|
100
|
|
|
|
|
: "-inf" |
1444
|
|
|
|
|
|
|
: "nan"); |
1445
|
|
|
|
|
|
|
else |
1446
|
6
|
|
|
|
|
|
quadmath_snprintf(rbuffer, 15 + _MATH_COMPLEX_C_Q_DIGITS, "%.*Qe", |
1447
|
|
|
|
|
|
|
_MATH_COMPLEX_C_Q_DIGITS - 1, __real__ t); |
1448
|
|
|
|
|
|
|
|
1449
|
13
|
|
|
|
|
|
ST(0) = sv_2mortal(newSVpv(rbuffer, 0)); |
1450
|
|
|
|
|
|
|
|
1451
|
13
|
|
|
|
|
|
query = _is_inf(__imag__ t); |
1452
|
13
|
100
|
|
|
|
|
if(query || _is_nan(__imag__ t)) |
|
|
100
|
|
|
|
|
|
1453
|
9
|
100
|
|
|
|
|
sprintf(rbuffer, "%s", query ? query > 0 ? "inf" |
1454
|
2
|
100
|
|
|
|
|
: "-inf" |
1455
|
|
|
|
|
|
|
: "nan"); |
1456
|
|
|
|
|
|
|
else |
1457
|
6
|
|
|
|
|
|
quadmath_snprintf(rbuffer, 15 + _MATH_COMPLEX_C_Q_DIGITS, "%.*Qe", |
1458
|
|
|
|
|
|
|
_MATH_COMPLEX_C_Q_DIGITS - 1, __imag__ t); |
1459
|
|
|
|
|
|
|
|
1460
|
13
|
|
|
|
|
|
ST(1) = sv_2mortal(newSVpv(rbuffer, 0)); |
1461
|
|
|
|
|
|
|
/**/ |
1462
|
13
|
|
|
|
|
|
Safefree(rbuffer); |
1463
|
13
|
|
|
|
|
|
XSRETURN(2); |
1464
|
|
|
|
|
|
|
} |
1465
|
0
|
|
|
|
|
|
else croak("q_to_str function needs a Math::Complex_C::Q arg but was supplied with a %s arg", h); |
1466
|
|
|
|
|
|
|
} |
1467
|
0
|
|
|
|
|
|
else croak("Invalid argument supplied to Math::Complex_C::Q::q_to_str function"); |
1468
|
|
|
|
|
|
|
} |
1469
|
|
|
|
|
|
|
|
1470
|
3
|
|
|
|
|
|
void _q_to_strp(pTHX_ SV * ld, int decimal_prec) { |
1471
|
3
|
|
|
|
|
|
dXSARGS; |
1472
|
|
|
|
|
|
|
MATH_COMPLEX t; |
1473
|
|
|
|
|
|
|
char *rbuffer; |
1474
|
|
|
|
|
|
|
int query; |
1475
|
|
|
|
|
|
|
|
1476
|
3
|
50
|
|
|
|
|
if(decimal_prec < 1)croak("2nd arg (precision) to _q_to_strp must be at least 1"); |
1477
|
|
|
|
|
|
|
|
1478
|
3
|
50
|
|
|
|
|
if(sv_isobject(ld)) { |
1479
|
3
|
50
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(ld))); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
1480
|
3
|
50
|
|
|
|
|
if(strEQ(h, "Math::Complex_C::Q")) { |
1481
|
3
|
50
|
|
|
|
|
EXTEND(SP, 2); |
1482
|
3
|
|
|
|
|
|
t = *(INT2PTR(MATH_COMPLEX *, SvIVX(SvRV(ld)))); |
1483
|
|
|
|
|
|
|
/* new */ |
1484
|
3
|
|
|
|
|
|
Newx(rbuffer, 12 + decimal_prec, char); |
1485
|
3
|
50
|
|
|
|
|
if(rbuffer == NULL) croak("Failed to allocate memory in q_to_strp"); |
1486
|
|
|
|
|
|
|
|
1487
|
3
|
|
|
|
|
|
query = _is_inf(__real__ t); |
1488
|
3
|
100
|
|
|
|
|
if(query || _is_nan(__real__ t)) |
|
|
50
|
|
|
|
|
|
1489
|
5
|
100
|
|
|
|
|
sprintf(rbuffer, "%s", query ? query > 0 ? "inf" |
1490
|
2
|
100
|
|
|
|
|
: "-inf" |
1491
|
|
|
|
|
|
|
: "nan"); |
1492
|
|
|
|
|
|
|
else |
1493
|
0
|
|
|
|
|
|
quadmath_snprintf(rbuffer, 12 + _MATH_COMPLEX_C_Q_DIGITS, "%.*Qe", |
1494
|
|
|
|
|
|
|
decimal_prec - 1, __real__ t); |
1495
|
|
|
|
|
|
|
|
1496
|
3
|
|
|
|
|
|
ST(0) = sv_2mortal(newSVpv(rbuffer, 0)); |
1497
|
|
|
|
|
|
|
|
1498
|
3
|
|
|
|
|
|
query = _is_inf(__imag__ t); |
1499
|
3
|
100
|
|
|
|
|
if(query || _is_nan(__imag__ t)) |
|
|
50
|
|
|
|
|
|
1500
|
5
|
100
|
|
|
|
|
sprintf(rbuffer, "%s", query ? query > 0 ? "inf" |
1501
|
2
|
100
|
|
|
|
|
: "-inf" |
1502
|
|
|
|
|
|
|
: "nan"); |
1503
|
|
|
|
|
|
|
else |
1504
|
0
|
|
|
|
|
|
quadmath_snprintf(rbuffer, 12 + _MATH_COMPLEX_C_Q_DIGITS, "%.*Qe", |
1505
|
|
|
|
|
|
|
decimal_prec - 1, __imag__ t); |
1506
|
|
|
|
|
|
|
|
1507
|
3
|
|
|
|
|
|
ST(1) = sv_2mortal(newSVpv(rbuffer, 0)); |
1508
|
|
|
|
|
|
|
/**/ |
1509
|
|
|
|
|
|
|
/* old |
1510
|
|
|
|
|
|
|
Newx(rbuffer, 12 + decimal_prec, char); |
1511
|
|
|
|
|
|
|
if(rbuffer == NULL) croak("Failed to allocate memory in q_to_strp"); |
1512
|
|
|
|
|
|
|
|
1513
|
|
|
|
|
|
|
quadmath_snprintf(rbuffer, 12 + decimal_prec, "%.*Qe", decimal_prec - 1, __real__ t); |
1514
|
|
|
|
|
|
|
ST(0) = sv_2mortal(newSVpv(rbuffer, 0)); |
1515
|
|
|
|
|
|
|
|
1516
|
|
|
|
|
|
|
quadmath_snprintf(rbuffer, 12 + decimal_prec, "%.*Qe", decimal_prec - 1, __imag__ t); |
1517
|
|
|
|
|
|
|
ST(1) = sv_2mortal(newSVpv(rbuffer, 0)); |
1518
|
|
|
|
|
|
|
*/ |
1519
|
|
|
|
|
|
|
|
1520
|
3
|
|
|
|
|
|
Safefree(rbuffer); |
1521
|
3
|
|
|
|
|
|
XSRETURN(2); |
1522
|
|
|
|
|
|
|
} |
1523
|
0
|
|
|
|
|
|
else croak("q_to_strp function needs a Math::Complex_C::Q arg but was supplied with a %s arg", h); |
1524
|
|
|
|
|
|
|
} |
1525
|
0
|
|
|
|
|
|
else croak("Invalid argument supplied to Math::Complex_C::Q::q_to_strp function"); |
1526
|
|
|
|
|
|
|
} |
1527
|
|
|
|
|
|
|
|
1528
|
0
|
|
|
|
|
|
SV * _LDBL_DIG(pTHX) { |
1529
|
|
|
|
|
|
|
#ifdef LDBL_DIG |
1530
|
0
|
|
|
|
|
|
return newSViv(LDBL_DIG); |
1531
|
|
|
|
|
|
|
#else |
1532
|
|
|
|
|
|
|
return 0; |
1533
|
|
|
|
|
|
|
#endif |
1534
|
|
|
|
|
|
|
} |
1535
|
|
|
|
|
|
|
|
1536
|
0
|
|
|
|
|
|
SV * _FLT128_DIG(pTHX) { |
1537
|
|
|
|
|
|
|
#ifdef FLT128_DIG |
1538
|
0
|
|
|
|
|
|
return newSViv(FLT128_DIG); |
1539
|
|
|
|
|
|
|
#else |
1540
|
|
|
|
|
|
|
return 0; |
1541
|
|
|
|
|
|
|
#endif |
1542
|
|
|
|
|
|
|
} |
1543
|
|
|
|
|
|
|
|
1544
|
0
|
|
|
|
|
|
SV * _get_xs_version(pTHX) { |
1545
|
0
|
|
|
|
|
|
return newSVpv(XS_VERSION, 0); |
1546
|
|
|
|
|
|
|
} |
1547
|
|
|
|
|
|
|
|
1548
|
20
|
|
|
|
|
|
SV * _itsa(pTHX_ SV * a) { |
1549
|
20
|
50
|
|
|
|
|
if(SvUOK(a)) return newSVuv(1); |
1550
|
20
|
100
|
|
|
|
|
if(SvIOK(a)) return newSVuv(2); |
1551
|
19
|
100
|
|
|
|
|
if(SvNOK(a)) return newSVuv(3); |
1552
|
4
|
50
|
|
|
|
|
if(SvPOK(a)) return newSVuv(4); |
1553
|
0
|
0
|
|
|
|
|
if(sv_isobject(a)) { |
1554
|
0
|
0
|
|
|
|
|
const char *h = HvNAME(SvSTASH(SvRV(a))); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1555
|
0
|
0
|
|
|
|
|
if(strEQ(h, "Math::Float128")) return newSVuv(113); |
1556
|
0
|
0
|
|
|
|
|
if(strEQ(h, "Math::Complex_C::Q")) return newSVuv(226); |
1557
|
|
|
|
|
|
|
} |
1558
|
0
|
|
|
|
|
|
return newSVuv(0); |
1559
|
|
|
|
|
|
|
} |
1560
|
|
|
|
|
|
|
|
1561
|
15
|
|
|
|
|
|
int _mingw_w64_bug(void) { |
1562
|
|
|
|
|
|
|
#ifdef MINGW_W64_BUGGY |
1563
|
|
|
|
|
|
|
return 1; |
1564
|
|
|
|
|
|
|
#else |
1565
|
15
|
|
|
|
|
|
return 0; |
1566
|
|
|
|
|
|
|
#endif |
1567
|
|
|
|
|
|
|
} |
1568
|
|
|
|
|
|
|
|
1569
|
1
|
|
|
|
|
|
int _gcc_tan_bug(void) { |
1570
|
|
|
|
|
|
|
#if defined(GCC_TAN_BUG) |
1571
|
|
|
|
|
|
|
return 1; |
1572
|
|
|
|
|
|
|
#else |
1573
|
1
|
|
|
|
|
|
return 0; |
1574
|
|
|
|
|
|
|
#endif |
1575
|
|
|
|
|
|
|
} |
1576
|
|
|
|
|
|
|
|
1577
|
4
|
|
|
|
|
|
int nnumflag(void) { |
1578
|
4
|
|
|
|
|
|
return nnum; |
1579
|
|
|
|
|
|
|
} |
1580
|
|
|
|
|
|
|
|
1581
|
1
|
|
|
|
|
|
void clear_nnum(void) { |
1582
|
1
|
|
|
|
|
|
nnum = 0; |
1583
|
1
|
|
|
|
|
|
} |
1584
|
|
|
|
|
|
|
|
1585
|
1
|
|
|
|
|
|
void set_nnum(int x) { |
1586
|
1
|
|
|
|
|
|
nnum = x; |
1587
|
1
|
|
|
|
|
|
} |
1588
|
|
|
|
|
|
|
|
1589
|
0
|
|
|
|
|
|
int _lln(pTHX_ SV * x) { |
1590
|
0
|
0
|
|
|
|
|
if(looks_like_number(x)) return 1; |
1591
|
0
|
|
|
|
|
|
return 0; |
1592
|
|
|
|
|
|
|
} |
1593
|
|
|
|
|
|
|
|
1594
|
|
|
|
|
|
|
|
1595
|
|
|
|
|
|
|
|
1596
|
|
|
|
|
|
|
|
1597
|
|
|
|
|
|
|
|
1598
|
|
|
|
|
|
|
|
1599
|
|
|
|
|
|
|
MODULE = Math::Complex_C::Q PACKAGE = Math::Complex_C::Q |
1600
|
|
|
|
|
|
|
|
1601
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
1602
|
|
|
|
|
|
|
|
1603
|
|
|
|
|
|
|
|
1604
|
|
|
|
|
|
|
void |
1605
|
|
|
|
|
|
|
q_set_prec (x) |
1606
|
|
|
|
|
|
|
int x |
1607
|
|
|
|
|
|
|
PREINIT: |
1608
|
|
|
|
|
|
|
I32* temp; |
1609
|
|
|
|
|
|
|
PPCODE: |
1610
|
2
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
1611
|
2
|
|
|
|
|
|
q_set_prec(x); |
1612
|
2
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
1613
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
1614
|
2
|
|
|
|
|
|
PL_markstack_ptr = temp; |
1615
|
2
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
1616
|
|
|
|
|
|
|
} |
1617
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
1618
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
1619
|
|
|
|
|
|
|
|
1620
|
|
|
|
|
|
|
int |
1621
|
|
|
|
|
|
|
q_get_prec () |
1622
|
|
|
|
|
|
|
|
1623
|
|
|
|
|
|
|
|
1624
|
|
|
|
|
|
|
int |
1625
|
|
|
|
|
|
|
is_nanq (a) |
1626
|
|
|
|
|
|
|
SV * a |
1627
|
|
|
|
|
|
|
CODE: |
1628
|
2
|
|
|
|
|
|
RETVAL = is_nanq (aTHX_ a); |
1629
|
|
|
|
|
|
|
OUTPUT: RETVAL |
1630
|
|
|
|
|
|
|
|
1631
|
|
|
|
|
|
|
int |
1632
|
|
|
|
|
|
|
is_infq (a) |
1633
|
|
|
|
|
|
|
SV * a |
1634
|
|
|
|
|
|
|
CODE: |
1635
|
6
|
|
|
|
|
|
RETVAL = is_infq (aTHX_ a); |
1636
|
|
|
|
|
|
|
OUTPUT: RETVAL |
1637
|
|
|
|
|
|
|
|
1638
|
|
|
|
|
|
|
SV * |
1639
|
|
|
|
|
|
|
create_cq () |
1640
|
|
|
|
|
|
|
CODE: |
1641
|
74
|
|
|
|
|
|
RETVAL = create_cq (aTHX); |
1642
|
|
|
|
|
|
|
OUTPUT: RETVAL |
1643
|
|
|
|
|
|
|
|
1644
|
|
|
|
|
|
|
|
1645
|
|
|
|
|
|
|
void |
1646
|
|
|
|
|
|
|
assign_cq (rop, d1, d2) |
1647
|
|
|
|
|
|
|
SV * rop |
1648
|
|
|
|
|
|
|
SV * d1 |
1649
|
|
|
|
|
|
|
SV * d2 |
1650
|
|
|
|
|
|
|
PREINIT: |
1651
|
|
|
|
|
|
|
I32* temp; |
1652
|
|
|
|
|
|
|
PPCODE: |
1653
|
77
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
1654
|
77
|
|
|
|
|
|
assign_cq(aTHX_ rop, d1, d2); |
1655
|
77
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
1656
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
1657
|
77
|
|
|
|
|
|
PL_markstack_ptr = temp; |
1658
|
77
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
1659
|
|
|
|
|
|
|
} |
1660
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
1661
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
1662
|
|
|
|
|
|
|
|
1663
|
|
|
|
|
|
|
void |
1664
|
|
|
|
|
|
|
set_real_cq (rop, d1) |
1665
|
|
|
|
|
|
|
SV * rop |
1666
|
|
|
|
|
|
|
SV * d1 |
1667
|
|
|
|
|
|
|
PREINIT: |
1668
|
|
|
|
|
|
|
I32* temp; |
1669
|
|
|
|
|
|
|
PPCODE: |
1670
|
4
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
1671
|
4
|
|
|
|
|
|
set_real_cq(aTHX_ rop, d1); |
1672
|
4
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
1673
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
1674
|
4
|
|
|
|
|
|
PL_markstack_ptr = temp; |
1675
|
4
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
1676
|
|
|
|
|
|
|
} |
1677
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
1678
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
1679
|
|
|
|
|
|
|
|
1680
|
|
|
|
|
|
|
void |
1681
|
|
|
|
|
|
|
set_imag_cq (rop, d2) |
1682
|
|
|
|
|
|
|
SV * rop |
1683
|
|
|
|
|
|
|
SV * d2 |
1684
|
|
|
|
|
|
|
PREINIT: |
1685
|
|
|
|
|
|
|
I32* temp; |
1686
|
|
|
|
|
|
|
PPCODE: |
1687
|
4
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
1688
|
4
|
|
|
|
|
|
set_imag_cq(aTHX_ rop, d2); |
1689
|
4
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
1690
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
1691
|
4
|
|
|
|
|
|
PL_markstack_ptr = temp; |
1692
|
4
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
1693
|
|
|
|
|
|
|
} |
1694
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
1695
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
1696
|
|
|
|
|
|
|
|
1697
|
|
|
|
|
|
|
void |
1698
|
|
|
|
|
|
|
F2cq (rop, d1, d2) |
1699
|
|
|
|
|
|
|
SV * rop |
1700
|
|
|
|
|
|
|
SV * d1 |
1701
|
|
|
|
|
|
|
SV * d2 |
1702
|
|
|
|
|
|
|
PREINIT: |
1703
|
|
|
|
|
|
|
I32* temp; |
1704
|
|
|
|
|
|
|
PPCODE: |
1705
|
0
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
1706
|
0
|
|
|
|
|
|
F2cq(aTHX_ rop, d1, d2); |
1707
|
0
|
0
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
1708
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
1709
|
0
|
|
|
|
|
|
PL_markstack_ptr = temp; |
1710
|
0
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
1711
|
|
|
|
|
|
|
} |
1712
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
1713
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
1714
|
|
|
|
|
|
|
|
1715
|
|
|
|
|
|
|
void |
1716
|
|
|
|
|
|
|
cq2F (rop1, rop2, op) |
1717
|
|
|
|
|
|
|
SV * rop1 |
1718
|
|
|
|
|
|
|
SV * rop2 |
1719
|
|
|
|
|
|
|
SV * op |
1720
|
|
|
|
|
|
|
PREINIT: |
1721
|
|
|
|
|
|
|
I32* temp; |
1722
|
|
|
|
|
|
|
PPCODE: |
1723
|
0
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
1724
|
0
|
|
|
|
|
|
cq2F(aTHX_ rop1, rop2, op); |
1725
|
0
|
0
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
1726
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
1727
|
0
|
|
|
|
|
|
PL_markstack_ptr = temp; |
1728
|
0
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
1729
|
|
|
|
|
|
|
} |
1730
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
1731
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
1732
|
|
|
|
|
|
|
|
1733
|
|
|
|
|
|
|
void |
1734
|
|
|
|
|
|
|
mul_cq (rop, op1, op2) |
1735
|
|
|
|
|
|
|
SV * rop |
1736
|
|
|
|
|
|
|
SV * op1 |
1737
|
|
|
|
|
|
|
SV * op2 |
1738
|
|
|
|
|
|
|
PREINIT: |
1739
|
|
|
|
|
|
|
I32* temp; |
1740
|
|
|
|
|
|
|
PPCODE: |
1741
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
1742
|
1
|
|
|
|
|
|
mul_cq(aTHX_ rop, op1, op2); |
1743
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
1744
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
1745
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
1746
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
1747
|
|
|
|
|
|
|
} |
1748
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
1749
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
1750
|
|
|
|
|
|
|
|
1751
|
|
|
|
|
|
|
void |
1752
|
|
|
|
|
|
|
mul_c_nvq (rop, op1, op2) |
1753
|
|
|
|
|
|
|
SV * rop |
1754
|
|
|
|
|
|
|
SV * op1 |
1755
|
|
|
|
|
|
|
SV * op2 |
1756
|
|
|
|
|
|
|
PREINIT: |
1757
|
|
|
|
|
|
|
I32* temp; |
1758
|
|
|
|
|
|
|
PPCODE: |
1759
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
1760
|
1
|
|
|
|
|
|
mul_c_nvq(aTHX_ rop, op1, op2); |
1761
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
1762
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
1763
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
1764
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
1765
|
|
|
|
|
|
|
} |
1766
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
1767
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
1768
|
|
|
|
|
|
|
|
1769
|
|
|
|
|
|
|
void |
1770
|
|
|
|
|
|
|
mul_c_ivq (rop, op1, op2) |
1771
|
|
|
|
|
|
|
SV * rop |
1772
|
|
|
|
|
|
|
SV * op1 |
1773
|
|
|
|
|
|
|
SV * op2 |
1774
|
|
|
|
|
|
|
PREINIT: |
1775
|
|
|
|
|
|
|
I32* temp; |
1776
|
|
|
|
|
|
|
PPCODE: |
1777
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
1778
|
1
|
|
|
|
|
|
mul_c_ivq(aTHX_ rop, op1, op2); |
1779
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
1780
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
1781
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
1782
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
1783
|
|
|
|
|
|
|
} |
1784
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
1785
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
1786
|
|
|
|
|
|
|
|
1787
|
|
|
|
|
|
|
void |
1788
|
|
|
|
|
|
|
mul_c_uvq (rop, op1, op2) |
1789
|
|
|
|
|
|
|
SV * rop |
1790
|
|
|
|
|
|
|
SV * op1 |
1791
|
|
|
|
|
|
|
SV * op2 |
1792
|
|
|
|
|
|
|
PREINIT: |
1793
|
|
|
|
|
|
|
I32* temp; |
1794
|
|
|
|
|
|
|
PPCODE: |
1795
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
1796
|
1
|
|
|
|
|
|
mul_c_uvq(aTHX_ rop, op1, op2); |
1797
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
1798
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
1799
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
1800
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
1801
|
|
|
|
|
|
|
} |
1802
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
1803
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
1804
|
|
|
|
|
|
|
|
1805
|
|
|
|
|
|
|
void |
1806
|
|
|
|
|
|
|
mul_c_pvq (rop, op1, op2) |
1807
|
|
|
|
|
|
|
SV * rop |
1808
|
|
|
|
|
|
|
SV * op1 |
1809
|
|
|
|
|
|
|
SV * op2 |
1810
|
|
|
|
|
|
|
PREINIT: |
1811
|
|
|
|
|
|
|
I32* temp; |
1812
|
|
|
|
|
|
|
PPCODE: |
1813
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
1814
|
1
|
|
|
|
|
|
mul_c_pvq(aTHX_ rop, op1, op2); |
1815
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
1816
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
1817
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
1818
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
1819
|
|
|
|
|
|
|
} |
1820
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
1821
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
1822
|
|
|
|
|
|
|
|
1823
|
|
|
|
|
|
|
void |
1824
|
|
|
|
|
|
|
div_cq (rop, op1, op2) |
1825
|
|
|
|
|
|
|
SV * rop |
1826
|
|
|
|
|
|
|
SV * op1 |
1827
|
|
|
|
|
|
|
SV * op2 |
1828
|
|
|
|
|
|
|
PREINIT: |
1829
|
|
|
|
|
|
|
I32* temp; |
1830
|
|
|
|
|
|
|
PPCODE: |
1831
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
1832
|
1
|
|
|
|
|
|
div_cq(aTHX_ rop, op1, op2); |
1833
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
1834
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
1835
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
1836
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
1837
|
|
|
|
|
|
|
} |
1838
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
1839
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
1840
|
|
|
|
|
|
|
|
1841
|
|
|
|
|
|
|
void |
1842
|
|
|
|
|
|
|
div_c_nvq (rop, op1, op2) |
1843
|
|
|
|
|
|
|
SV * rop |
1844
|
|
|
|
|
|
|
SV * op1 |
1845
|
|
|
|
|
|
|
SV * op2 |
1846
|
|
|
|
|
|
|
PREINIT: |
1847
|
|
|
|
|
|
|
I32* temp; |
1848
|
|
|
|
|
|
|
PPCODE: |
1849
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
1850
|
1
|
|
|
|
|
|
div_c_nvq(aTHX_ rop, op1, op2); |
1851
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
1852
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
1853
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
1854
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
1855
|
|
|
|
|
|
|
} |
1856
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
1857
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
1858
|
|
|
|
|
|
|
|
1859
|
|
|
|
|
|
|
void |
1860
|
|
|
|
|
|
|
div_c_ivq (rop, op1, op2) |
1861
|
|
|
|
|
|
|
SV * rop |
1862
|
|
|
|
|
|
|
SV * op1 |
1863
|
|
|
|
|
|
|
SV * op2 |
1864
|
|
|
|
|
|
|
PREINIT: |
1865
|
|
|
|
|
|
|
I32* temp; |
1866
|
|
|
|
|
|
|
PPCODE: |
1867
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
1868
|
1
|
|
|
|
|
|
div_c_ivq(aTHX_ rop, op1, op2); |
1869
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
1870
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
1871
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
1872
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
1873
|
|
|
|
|
|
|
} |
1874
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
1875
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
1876
|
|
|
|
|
|
|
|
1877
|
|
|
|
|
|
|
void |
1878
|
|
|
|
|
|
|
div_c_uvq (rop, op1, op2) |
1879
|
|
|
|
|
|
|
SV * rop |
1880
|
|
|
|
|
|
|
SV * op1 |
1881
|
|
|
|
|
|
|
SV * op2 |
1882
|
|
|
|
|
|
|
PREINIT: |
1883
|
|
|
|
|
|
|
I32* temp; |
1884
|
|
|
|
|
|
|
PPCODE: |
1885
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
1886
|
1
|
|
|
|
|
|
div_c_uvq(aTHX_ rop, op1, op2); |
1887
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
1888
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
1889
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
1890
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
1891
|
|
|
|
|
|
|
} |
1892
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
1893
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
1894
|
|
|
|
|
|
|
|
1895
|
|
|
|
|
|
|
void |
1896
|
|
|
|
|
|
|
div_c_pvq (rop, op1, op2) |
1897
|
|
|
|
|
|
|
SV * rop |
1898
|
|
|
|
|
|
|
SV * op1 |
1899
|
|
|
|
|
|
|
SV * op2 |
1900
|
|
|
|
|
|
|
PREINIT: |
1901
|
|
|
|
|
|
|
I32* temp; |
1902
|
|
|
|
|
|
|
PPCODE: |
1903
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
1904
|
1
|
|
|
|
|
|
div_c_pvq(aTHX_ rop, op1, op2); |
1905
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
1906
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
1907
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
1908
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
1909
|
|
|
|
|
|
|
} |
1910
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
1911
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
1912
|
|
|
|
|
|
|
|
1913
|
|
|
|
|
|
|
void |
1914
|
|
|
|
|
|
|
add_cq (rop, op1, op2) |
1915
|
|
|
|
|
|
|
SV * rop |
1916
|
|
|
|
|
|
|
SV * op1 |
1917
|
|
|
|
|
|
|
SV * op2 |
1918
|
|
|
|
|
|
|
PREINIT: |
1919
|
|
|
|
|
|
|
I32* temp; |
1920
|
|
|
|
|
|
|
PPCODE: |
1921
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
1922
|
1
|
|
|
|
|
|
add_cq(aTHX_ rop, op1, op2); |
1923
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
1924
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
1925
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
1926
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
1927
|
|
|
|
|
|
|
} |
1928
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
1929
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
1930
|
|
|
|
|
|
|
|
1931
|
|
|
|
|
|
|
void |
1932
|
|
|
|
|
|
|
add_c_nvq (rop, op1, op2) |
1933
|
|
|
|
|
|
|
SV * rop |
1934
|
|
|
|
|
|
|
SV * op1 |
1935
|
|
|
|
|
|
|
SV * op2 |
1936
|
|
|
|
|
|
|
PREINIT: |
1937
|
|
|
|
|
|
|
I32* temp; |
1938
|
|
|
|
|
|
|
PPCODE: |
1939
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
1940
|
1
|
|
|
|
|
|
add_c_nvq(aTHX_ rop, op1, op2); |
1941
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
1942
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
1943
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
1944
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
1945
|
|
|
|
|
|
|
} |
1946
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
1947
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
1948
|
|
|
|
|
|
|
|
1949
|
|
|
|
|
|
|
void |
1950
|
|
|
|
|
|
|
add_c_ivq (rop, op1, op2) |
1951
|
|
|
|
|
|
|
SV * rop |
1952
|
|
|
|
|
|
|
SV * op1 |
1953
|
|
|
|
|
|
|
SV * op2 |
1954
|
|
|
|
|
|
|
PREINIT: |
1955
|
|
|
|
|
|
|
I32* temp; |
1956
|
|
|
|
|
|
|
PPCODE: |
1957
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
1958
|
1
|
|
|
|
|
|
add_c_ivq(aTHX_ rop, op1, op2); |
1959
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
1960
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
1961
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
1962
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
1963
|
|
|
|
|
|
|
} |
1964
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
1965
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
1966
|
|
|
|
|
|
|
|
1967
|
|
|
|
|
|
|
void |
1968
|
|
|
|
|
|
|
add_c_uvq (rop, op1, op2) |
1969
|
|
|
|
|
|
|
SV * rop |
1970
|
|
|
|
|
|
|
SV * op1 |
1971
|
|
|
|
|
|
|
SV * op2 |
1972
|
|
|
|
|
|
|
PREINIT: |
1973
|
|
|
|
|
|
|
I32* temp; |
1974
|
|
|
|
|
|
|
PPCODE: |
1975
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
1976
|
1
|
|
|
|
|
|
add_c_uvq(aTHX_ rop, op1, op2); |
1977
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
1978
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
1979
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
1980
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
1981
|
|
|
|
|
|
|
} |
1982
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
1983
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
1984
|
|
|
|
|
|
|
|
1985
|
|
|
|
|
|
|
void |
1986
|
|
|
|
|
|
|
add_c_pvq (rop, op1, op2) |
1987
|
|
|
|
|
|
|
SV * rop |
1988
|
|
|
|
|
|
|
SV * op1 |
1989
|
|
|
|
|
|
|
SV * op2 |
1990
|
|
|
|
|
|
|
PREINIT: |
1991
|
|
|
|
|
|
|
I32* temp; |
1992
|
|
|
|
|
|
|
PPCODE: |
1993
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
1994
|
1
|
|
|
|
|
|
add_c_pvq(aTHX_ rop, op1, op2); |
1995
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
1996
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
1997
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
1998
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
1999
|
|
|
|
|
|
|
} |
2000
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2001
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2002
|
|
|
|
|
|
|
|
2003
|
|
|
|
|
|
|
void |
2004
|
|
|
|
|
|
|
sub_cq (rop, op1, op2) |
2005
|
|
|
|
|
|
|
SV * rop |
2006
|
|
|
|
|
|
|
SV * op1 |
2007
|
|
|
|
|
|
|
SV * op2 |
2008
|
|
|
|
|
|
|
PREINIT: |
2009
|
|
|
|
|
|
|
I32* temp; |
2010
|
|
|
|
|
|
|
PPCODE: |
2011
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2012
|
1
|
|
|
|
|
|
sub_cq(aTHX_ rop, op1, op2); |
2013
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2014
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2015
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2016
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2017
|
|
|
|
|
|
|
} |
2018
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2019
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2020
|
|
|
|
|
|
|
|
2021
|
|
|
|
|
|
|
void |
2022
|
|
|
|
|
|
|
sub_c_nvq (rop, op1, op2) |
2023
|
|
|
|
|
|
|
SV * rop |
2024
|
|
|
|
|
|
|
SV * op1 |
2025
|
|
|
|
|
|
|
SV * op2 |
2026
|
|
|
|
|
|
|
PREINIT: |
2027
|
|
|
|
|
|
|
I32* temp; |
2028
|
|
|
|
|
|
|
PPCODE: |
2029
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2030
|
1
|
|
|
|
|
|
sub_c_nvq(aTHX_ rop, op1, op2); |
2031
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2032
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2033
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2034
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2035
|
|
|
|
|
|
|
} |
2036
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2037
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2038
|
|
|
|
|
|
|
|
2039
|
|
|
|
|
|
|
void |
2040
|
|
|
|
|
|
|
sub_c_ivq (rop, op1, op2) |
2041
|
|
|
|
|
|
|
SV * rop |
2042
|
|
|
|
|
|
|
SV * op1 |
2043
|
|
|
|
|
|
|
SV * op2 |
2044
|
|
|
|
|
|
|
PREINIT: |
2045
|
|
|
|
|
|
|
I32* temp; |
2046
|
|
|
|
|
|
|
PPCODE: |
2047
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2048
|
1
|
|
|
|
|
|
sub_c_ivq(aTHX_ rop, op1, op2); |
2049
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2050
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2051
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2052
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2053
|
|
|
|
|
|
|
} |
2054
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2055
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2056
|
|
|
|
|
|
|
|
2057
|
|
|
|
|
|
|
void |
2058
|
|
|
|
|
|
|
sub_c_uvq (rop, op1, op2) |
2059
|
|
|
|
|
|
|
SV * rop |
2060
|
|
|
|
|
|
|
SV * op1 |
2061
|
|
|
|
|
|
|
SV * op2 |
2062
|
|
|
|
|
|
|
PREINIT: |
2063
|
|
|
|
|
|
|
I32* temp; |
2064
|
|
|
|
|
|
|
PPCODE: |
2065
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2066
|
1
|
|
|
|
|
|
sub_c_uvq(aTHX_ rop, op1, op2); |
2067
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2068
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2069
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2070
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2071
|
|
|
|
|
|
|
} |
2072
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2073
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2074
|
|
|
|
|
|
|
|
2075
|
|
|
|
|
|
|
void |
2076
|
|
|
|
|
|
|
sub_c_pvq (rop, op1, op2) |
2077
|
|
|
|
|
|
|
SV * rop |
2078
|
|
|
|
|
|
|
SV * op1 |
2079
|
|
|
|
|
|
|
SV * op2 |
2080
|
|
|
|
|
|
|
PREINIT: |
2081
|
|
|
|
|
|
|
I32* temp; |
2082
|
|
|
|
|
|
|
PPCODE: |
2083
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2084
|
1
|
|
|
|
|
|
sub_c_pvq(aTHX_ rop, op1, op2); |
2085
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2086
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2087
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2088
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2089
|
|
|
|
|
|
|
} |
2090
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2091
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2092
|
|
|
|
|
|
|
|
2093
|
|
|
|
|
|
|
void |
2094
|
|
|
|
|
|
|
DESTROY (op) |
2095
|
|
|
|
|
|
|
SV * op |
2096
|
|
|
|
|
|
|
PREINIT: |
2097
|
|
|
|
|
|
|
I32* temp; |
2098
|
|
|
|
|
|
|
PPCODE: |
2099
|
128
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2100
|
128
|
|
|
|
|
|
DESTROY(aTHX_ op); |
2101
|
128
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2102
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2103
|
128
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2104
|
128
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2105
|
|
|
|
|
|
|
} |
2106
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2107
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2108
|
|
|
|
|
|
|
|
2109
|
|
|
|
|
|
|
SV * |
2110
|
|
|
|
|
|
|
real_cq (op) |
2111
|
|
|
|
|
|
|
SV * op |
2112
|
|
|
|
|
|
|
CODE: |
2113
|
81
|
|
|
|
|
|
RETVAL = real_cq (aTHX_ op); |
2114
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2115
|
|
|
|
|
|
|
|
2116
|
|
|
|
|
|
|
SV * |
2117
|
|
|
|
|
|
|
real_cq2F (op) |
2118
|
|
|
|
|
|
|
SV * op |
2119
|
|
|
|
|
|
|
CODE: |
2120
|
0
|
|
|
|
|
|
RETVAL = real_cq2F (aTHX_ op); |
2121
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2122
|
|
|
|
|
|
|
|
2123
|
|
|
|
|
|
|
void |
2124
|
|
|
|
|
|
|
real_cq2str (op) |
2125
|
|
|
|
|
|
|
SV * op |
2126
|
|
|
|
|
|
|
PREINIT: |
2127
|
|
|
|
|
|
|
I32* temp; |
2128
|
|
|
|
|
|
|
PPCODE: |
2129
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2130
|
1
|
|
|
|
|
|
real_cq2str(aTHX_ op); |
2131
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2132
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2133
|
0
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2134
|
0
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2135
|
|
|
|
|
|
|
} |
2136
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2137
|
1
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2138
|
|
|
|
|
|
|
|
2139
|
|
|
|
|
|
|
SV * |
2140
|
|
|
|
|
|
|
imag_cq (op) |
2141
|
|
|
|
|
|
|
SV * op |
2142
|
|
|
|
|
|
|
CODE: |
2143
|
60
|
|
|
|
|
|
RETVAL = imag_cq (aTHX_ op); |
2144
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2145
|
|
|
|
|
|
|
|
2146
|
|
|
|
|
|
|
SV * |
2147
|
|
|
|
|
|
|
imag_cq2F (op) |
2148
|
|
|
|
|
|
|
SV * op |
2149
|
|
|
|
|
|
|
CODE: |
2150
|
0
|
|
|
|
|
|
RETVAL = imag_cq2F (aTHX_ op); |
2151
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2152
|
|
|
|
|
|
|
|
2153
|
|
|
|
|
|
|
void |
2154
|
|
|
|
|
|
|
imag_cq2str (op) |
2155
|
|
|
|
|
|
|
SV * op |
2156
|
|
|
|
|
|
|
PREINIT: |
2157
|
|
|
|
|
|
|
I32* temp; |
2158
|
|
|
|
|
|
|
PPCODE: |
2159
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2160
|
1
|
|
|
|
|
|
imag_cq2str(aTHX_ op); |
2161
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2162
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2163
|
0
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2164
|
0
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2165
|
|
|
|
|
|
|
} |
2166
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2167
|
1
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2168
|
|
|
|
|
|
|
|
2169
|
|
|
|
|
|
|
SV * |
2170
|
|
|
|
|
|
|
arg_cq (op) |
2171
|
|
|
|
|
|
|
SV * op |
2172
|
|
|
|
|
|
|
CODE: |
2173
|
1
|
|
|
|
|
|
RETVAL = arg_cq (aTHX_ op); |
2174
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2175
|
|
|
|
|
|
|
|
2176
|
|
|
|
|
|
|
SV * |
2177
|
|
|
|
|
|
|
arg_cq2F (op) |
2178
|
|
|
|
|
|
|
SV * op |
2179
|
|
|
|
|
|
|
CODE: |
2180
|
0
|
|
|
|
|
|
RETVAL = arg_cq2F (aTHX_ op); |
2181
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2182
|
|
|
|
|
|
|
|
2183
|
|
|
|
|
|
|
void |
2184
|
|
|
|
|
|
|
arg_cq2str (op) |
2185
|
|
|
|
|
|
|
SV * op |
2186
|
|
|
|
|
|
|
PREINIT: |
2187
|
|
|
|
|
|
|
I32* temp; |
2188
|
|
|
|
|
|
|
PPCODE: |
2189
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2190
|
1
|
|
|
|
|
|
arg_cq2str(aTHX_ op); |
2191
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2192
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2193
|
0
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2194
|
0
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2195
|
|
|
|
|
|
|
} |
2196
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2197
|
1
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2198
|
|
|
|
|
|
|
|
2199
|
|
|
|
|
|
|
SV * |
2200
|
|
|
|
|
|
|
abs_cq (op) |
2201
|
|
|
|
|
|
|
SV * op |
2202
|
|
|
|
|
|
|
CODE: |
2203
|
1
|
|
|
|
|
|
RETVAL = abs_cq (aTHX_ op); |
2204
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2205
|
|
|
|
|
|
|
|
2206
|
|
|
|
|
|
|
SV * |
2207
|
|
|
|
|
|
|
abs_cq2F (op) |
2208
|
|
|
|
|
|
|
SV * op |
2209
|
|
|
|
|
|
|
CODE: |
2210
|
0
|
|
|
|
|
|
RETVAL = abs_cq2F (aTHX_ op); |
2211
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2212
|
|
|
|
|
|
|
|
2213
|
|
|
|
|
|
|
void |
2214
|
|
|
|
|
|
|
abs_cq2str (op) |
2215
|
|
|
|
|
|
|
SV * op |
2216
|
|
|
|
|
|
|
PREINIT: |
2217
|
|
|
|
|
|
|
I32* temp; |
2218
|
|
|
|
|
|
|
PPCODE: |
2219
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2220
|
1
|
|
|
|
|
|
abs_cq2str(aTHX_ op); |
2221
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2222
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2223
|
0
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2224
|
0
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2225
|
|
|
|
|
|
|
} |
2226
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2227
|
1
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2228
|
|
|
|
|
|
|
|
2229
|
|
|
|
|
|
|
void |
2230
|
|
|
|
|
|
|
conj_cq (rop, op) |
2231
|
|
|
|
|
|
|
SV * rop |
2232
|
|
|
|
|
|
|
SV * op |
2233
|
|
|
|
|
|
|
PREINIT: |
2234
|
|
|
|
|
|
|
I32* temp; |
2235
|
|
|
|
|
|
|
PPCODE: |
2236
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2237
|
1
|
|
|
|
|
|
conj_cq(aTHX_ rop, op); |
2238
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2239
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2240
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2241
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2242
|
|
|
|
|
|
|
} |
2243
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2244
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2245
|
|
|
|
|
|
|
|
2246
|
|
|
|
|
|
|
void |
2247
|
|
|
|
|
|
|
acos_cq (rop, op) |
2248
|
|
|
|
|
|
|
SV * rop |
2249
|
|
|
|
|
|
|
SV * op |
2250
|
|
|
|
|
|
|
PREINIT: |
2251
|
|
|
|
|
|
|
I32* temp; |
2252
|
|
|
|
|
|
|
PPCODE: |
2253
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2254
|
1
|
|
|
|
|
|
acos_cq(aTHX_ rop, op); |
2255
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2256
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2257
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2258
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2259
|
|
|
|
|
|
|
} |
2260
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2261
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2262
|
|
|
|
|
|
|
|
2263
|
|
|
|
|
|
|
void |
2264
|
|
|
|
|
|
|
asin_cq (rop, op) |
2265
|
|
|
|
|
|
|
SV * rop |
2266
|
|
|
|
|
|
|
SV * op |
2267
|
|
|
|
|
|
|
PREINIT: |
2268
|
|
|
|
|
|
|
I32* temp; |
2269
|
|
|
|
|
|
|
PPCODE: |
2270
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2271
|
1
|
|
|
|
|
|
asin_cq(aTHX_ rop, op); |
2272
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2273
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2274
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2275
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2276
|
|
|
|
|
|
|
} |
2277
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2278
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2279
|
|
|
|
|
|
|
|
2280
|
|
|
|
|
|
|
void |
2281
|
|
|
|
|
|
|
atan_cq (rop, op) |
2282
|
|
|
|
|
|
|
SV * rop |
2283
|
|
|
|
|
|
|
SV * op |
2284
|
|
|
|
|
|
|
PREINIT: |
2285
|
|
|
|
|
|
|
I32* temp; |
2286
|
|
|
|
|
|
|
PPCODE: |
2287
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2288
|
1
|
|
|
|
|
|
atan_cq(aTHX_ rop, op); |
2289
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2290
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2291
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2292
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2293
|
|
|
|
|
|
|
} |
2294
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2295
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2296
|
|
|
|
|
|
|
|
2297
|
|
|
|
|
|
|
void |
2298
|
|
|
|
|
|
|
cos_cq (rop, op) |
2299
|
|
|
|
|
|
|
SV * rop |
2300
|
|
|
|
|
|
|
SV * op |
2301
|
|
|
|
|
|
|
PREINIT: |
2302
|
|
|
|
|
|
|
I32* temp; |
2303
|
|
|
|
|
|
|
PPCODE: |
2304
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2305
|
1
|
|
|
|
|
|
cos_cq(aTHX_ rop, op); |
2306
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2307
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2308
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2309
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2310
|
|
|
|
|
|
|
} |
2311
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2312
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2313
|
|
|
|
|
|
|
|
2314
|
|
|
|
|
|
|
void |
2315
|
|
|
|
|
|
|
sin_cq (rop, op) |
2316
|
|
|
|
|
|
|
SV * rop |
2317
|
|
|
|
|
|
|
SV * op |
2318
|
|
|
|
|
|
|
PREINIT: |
2319
|
|
|
|
|
|
|
I32* temp; |
2320
|
|
|
|
|
|
|
PPCODE: |
2321
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2322
|
1
|
|
|
|
|
|
sin_cq(aTHX_ rop, op); |
2323
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2324
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2325
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2326
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2327
|
|
|
|
|
|
|
} |
2328
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2329
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2330
|
|
|
|
|
|
|
|
2331
|
|
|
|
|
|
|
void |
2332
|
|
|
|
|
|
|
tan_cq (rop, op) |
2333
|
|
|
|
|
|
|
SV * rop |
2334
|
|
|
|
|
|
|
SV * op |
2335
|
|
|
|
|
|
|
PREINIT: |
2336
|
|
|
|
|
|
|
I32* temp; |
2337
|
|
|
|
|
|
|
PPCODE: |
2338
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2339
|
1
|
|
|
|
|
|
tan_cq(aTHX_ rop, op); |
2340
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2341
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2342
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2343
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2344
|
|
|
|
|
|
|
} |
2345
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2346
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2347
|
|
|
|
|
|
|
|
2348
|
|
|
|
|
|
|
void |
2349
|
|
|
|
|
|
|
acosh_cq (rop, op) |
2350
|
|
|
|
|
|
|
SV * rop |
2351
|
|
|
|
|
|
|
SV * op |
2352
|
|
|
|
|
|
|
PREINIT: |
2353
|
|
|
|
|
|
|
I32* temp; |
2354
|
|
|
|
|
|
|
PPCODE: |
2355
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2356
|
1
|
|
|
|
|
|
acosh_cq(aTHX_ rop, op); |
2357
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2358
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2359
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2360
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2361
|
|
|
|
|
|
|
} |
2362
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2363
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2364
|
|
|
|
|
|
|
|
2365
|
|
|
|
|
|
|
void |
2366
|
|
|
|
|
|
|
asinh_cq (rop, op) |
2367
|
|
|
|
|
|
|
SV * rop |
2368
|
|
|
|
|
|
|
SV * op |
2369
|
|
|
|
|
|
|
PREINIT: |
2370
|
|
|
|
|
|
|
I32* temp; |
2371
|
|
|
|
|
|
|
PPCODE: |
2372
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2373
|
1
|
|
|
|
|
|
asinh_cq(aTHX_ rop, op); |
2374
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2375
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2376
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2377
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2378
|
|
|
|
|
|
|
} |
2379
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2380
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2381
|
|
|
|
|
|
|
|
2382
|
|
|
|
|
|
|
void |
2383
|
|
|
|
|
|
|
atanh_cq (rop, op) |
2384
|
|
|
|
|
|
|
SV * rop |
2385
|
|
|
|
|
|
|
SV * op |
2386
|
|
|
|
|
|
|
PREINIT: |
2387
|
|
|
|
|
|
|
I32* temp; |
2388
|
|
|
|
|
|
|
PPCODE: |
2389
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2390
|
1
|
|
|
|
|
|
atanh_cq(aTHX_ rop, op); |
2391
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2392
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2393
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2394
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2395
|
|
|
|
|
|
|
} |
2396
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2397
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2398
|
|
|
|
|
|
|
|
2399
|
|
|
|
|
|
|
void |
2400
|
|
|
|
|
|
|
cosh_cq (rop, op) |
2401
|
|
|
|
|
|
|
SV * rop |
2402
|
|
|
|
|
|
|
SV * op |
2403
|
|
|
|
|
|
|
PREINIT: |
2404
|
|
|
|
|
|
|
I32* temp; |
2405
|
|
|
|
|
|
|
PPCODE: |
2406
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2407
|
1
|
|
|
|
|
|
cosh_cq(aTHX_ rop, op); |
2408
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2409
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2410
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2411
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2412
|
|
|
|
|
|
|
} |
2413
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2414
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2415
|
|
|
|
|
|
|
|
2416
|
|
|
|
|
|
|
void |
2417
|
|
|
|
|
|
|
sinh_cq (rop, op) |
2418
|
|
|
|
|
|
|
SV * rop |
2419
|
|
|
|
|
|
|
SV * op |
2420
|
|
|
|
|
|
|
PREINIT: |
2421
|
|
|
|
|
|
|
I32* temp; |
2422
|
|
|
|
|
|
|
PPCODE: |
2423
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2424
|
1
|
|
|
|
|
|
sinh_cq(aTHX_ rop, op); |
2425
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2426
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2427
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2428
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2429
|
|
|
|
|
|
|
} |
2430
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2431
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2432
|
|
|
|
|
|
|
|
2433
|
|
|
|
|
|
|
void |
2434
|
|
|
|
|
|
|
tanh_cq (rop, op) |
2435
|
|
|
|
|
|
|
SV * rop |
2436
|
|
|
|
|
|
|
SV * op |
2437
|
|
|
|
|
|
|
PREINIT: |
2438
|
|
|
|
|
|
|
I32* temp; |
2439
|
|
|
|
|
|
|
PPCODE: |
2440
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2441
|
1
|
|
|
|
|
|
tanh_cq(aTHX_ rop, op); |
2442
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2443
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2444
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2445
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2446
|
|
|
|
|
|
|
} |
2447
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2448
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2449
|
|
|
|
|
|
|
|
2450
|
|
|
|
|
|
|
void |
2451
|
|
|
|
|
|
|
exp_cq (rop, op) |
2452
|
|
|
|
|
|
|
SV * rop |
2453
|
|
|
|
|
|
|
SV * op |
2454
|
|
|
|
|
|
|
PREINIT: |
2455
|
|
|
|
|
|
|
I32* temp; |
2456
|
|
|
|
|
|
|
PPCODE: |
2457
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2458
|
1
|
|
|
|
|
|
exp_cq(aTHX_ rop, op); |
2459
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2460
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2461
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2462
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2463
|
|
|
|
|
|
|
} |
2464
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2465
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2466
|
|
|
|
|
|
|
|
2467
|
|
|
|
|
|
|
void |
2468
|
|
|
|
|
|
|
log_cq (rop, op) |
2469
|
|
|
|
|
|
|
SV * rop |
2470
|
|
|
|
|
|
|
SV * op |
2471
|
|
|
|
|
|
|
PREINIT: |
2472
|
|
|
|
|
|
|
I32* temp; |
2473
|
|
|
|
|
|
|
PPCODE: |
2474
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2475
|
1
|
|
|
|
|
|
log_cq(aTHX_ rop, op); |
2476
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2477
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2478
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2479
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2480
|
|
|
|
|
|
|
} |
2481
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2482
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2483
|
|
|
|
|
|
|
|
2484
|
|
|
|
|
|
|
void |
2485
|
|
|
|
|
|
|
sqrt_cq (rop, op) |
2486
|
|
|
|
|
|
|
SV * rop |
2487
|
|
|
|
|
|
|
SV * op |
2488
|
|
|
|
|
|
|
PREINIT: |
2489
|
|
|
|
|
|
|
I32* temp; |
2490
|
|
|
|
|
|
|
PPCODE: |
2491
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2492
|
1
|
|
|
|
|
|
sqrt_cq(aTHX_ rop, op); |
2493
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2494
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2495
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2496
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2497
|
|
|
|
|
|
|
} |
2498
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2499
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2500
|
|
|
|
|
|
|
|
2501
|
|
|
|
|
|
|
void |
2502
|
|
|
|
|
|
|
proj_cq (rop, op) |
2503
|
|
|
|
|
|
|
SV * rop |
2504
|
|
|
|
|
|
|
SV * op |
2505
|
|
|
|
|
|
|
PREINIT: |
2506
|
|
|
|
|
|
|
I32* temp; |
2507
|
|
|
|
|
|
|
PPCODE: |
2508
|
6
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2509
|
6
|
|
|
|
|
|
proj_cq(aTHX_ rop, op); |
2510
|
6
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2511
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2512
|
6
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2513
|
6
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2514
|
|
|
|
|
|
|
} |
2515
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2516
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2517
|
|
|
|
|
|
|
|
2518
|
|
|
|
|
|
|
void |
2519
|
|
|
|
|
|
|
pow_cq (rop, op, exp) |
2520
|
|
|
|
|
|
|
SV * rop |
2521
|
|
|
|
|
|
|
SV * op |
2522
|
|
|
|
|
|
|
SV * exp |
2523
|
|
|
|
|
|
|
PREINIT: |
2524
|
|
|
|
|
|
|
I32* temp; |
2525
|
|
|
|
|
|
|
PPCODE: |
2526
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2527
|
1
|
|
|
|
|
|
pow_cq(aTHX_ rop, op, exp); |
2528
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2529
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2530
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2531
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2532
|
|
|
|
|
|
|
} |
2533
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2534
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2535
|
|
|
|
|
|
|
|
2536
|
|
|
|
|
|
|
SV * |
2537
|
|
|
|
|
|
|
_overload_true (rop, second, third) |
2538
|
|
|
|
|
|
|
SV * rop |
2539
|
|
|
|
|
|
|
SV * second |
2540
|
|
|
|
|
|
|
SV * third |
2541
|
|
|
|
|
|
|
CODE: |
2542
|
4
|
|
|
|
|
|
RETVAL = _overload_true (aTHX_ rop, second, third); |
2543
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2544
|
|
|
|
|
|
|
|
2545
|
|
|
|
|
|
|
SV * |
2546
|
|
|
|
|
|
|
_overload_not (rop, second, third) |
2547
|
|
|
|
|
|
|
SV * rop |
2548
|
|
|
|
|
|
|
SV * second |
2549
|
|
|
|
|
|
|
SV * third |
2550
|
|
|
|
|
|
|
CODE: |
2551
|
8
|
|
|
|
|
|
RETVAL = _overload_not (aTHX_ rop, second, third); |
2552
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2553
|
|
|
|
|
|
|
|
2554
|
|
|
|
|
|
|
SV * |
2555
|
|
|
|
|
|
|
_overload_equiv (a, b, third) |
2556
|
|
|
|
|
|
|
SV * a |
2557
|
|
|
|
|
|
|
SV * b |
2558
|
|
|
|
|
|
|
SV * third |
2559
|
|
|
|
|
|
|
CODE: |
2560
|
41
|
|
|
|
|
|
RETVAL = _overload_equiv (aTHX_ a, b, third); |
2561
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2562
|
|
|
|
|
|
|
|
2563
|
|
|
|
|
|
|
SV * |
2564
|
|
|
|
|
|
|
_overload_not_equiv (a, b, third) |
2565
|
|
|
|
|
|
|
SV * a |
2566
|
|
|
|
|
|
|
SV * b |
2567
|
|
|
|
|
|
|
SV * third |
2568
|
|
|
|
|
|
|
CODE: |
2569
|
7
|
|
|
|
|
|
RETVAL = _overload_not_equiv (aTHX_ a, b, third); |
2570
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2571
|
|
|
|
|
|
|
|
2572
|
|
|
|
|
|
|
SV * |
2573
|
|
|
|
|
|
|
_overload_pow (a, b, third) |
2574
|
|
|
|
|
|
|
SV * a |
2575
|
|
|
|
|
|
|
SV * b |
2576
|
|
|
|
|
|
|
SV * third |
2577
|
|
|
|
|
|
|
CODE: |
2578
|
17
|
|
|
|
|
|
RETVAL = _overload_pow (aTHX_ a, b, third); |
2579
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2580
|
|
|
|
|
|
|
|
2581
|
|
|
|
|
|
|
SV * |
2582
|
|
|
|
|
|
|
_overload_mul (a, b, third) |
2583
|
|
|
|
|
|
|
SV * a |
2584
|
|
|
|
|
|
|
SV * b |
2585
|
|
|
|
|
|
|
SV * third |
2586
|
|
|
|
|
|
|
CODE: |
2587
|
5
|
|
|
|
|
|
RETVAL = _overload_mul (aTHX_ a, b, third); |
2588
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2589
|
|
|
|
|
|
|
|
2590
|
|
|
|
|
|
|
SV * |
2591
|
|
|
|
|
|
|
_overload_add (a, b, third) |
2592
|
|
|
|
|
|
|
SV * a |
2593
|
|
|
|
|
|
|
SV * b |
2594
|
|
|
|
|
|
|
SV * third |
2595
|
|
|
|
|
|
|
CODE: |
2596
|
5
|
|
|
|
|
|
RETVAL = _overload_add (aTHX_ a, b, third); |
2597
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2598
|
|
|
|
|
|
|
|
2599
|
|
|
|
|
|
|
SV * |
2600
|
|
|
|
|
|
|
_overload_div (a, b, third) |
2601
|
|
|
|
|
|
|
SV * a |
2602
|
|
|
|
|
|
|
SV * b |
2603
|
|
|
|
|
|
|
SV * third |
2604
|
|
|
|
|
|
|
CODE: |
2605
|
9
|
|
|
|
|
|
RETVAL = _overload_div (aTHX_ a, b, third); |
2606
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2607
|
|
|
|
|
|
|
|
2608
|
|
|
|
|
|
|
SV * |
2609
|
|
|
|
|
|
|
_overload_sub (a, b, third) |
2610
|
|
|
|
|
|
|
SV * a |
2611
|
|
|
|
|
|
|
SV * b |
2612
|
|
|
|
|
|
|
SV * third |
2613
|
|
|
|
|
|
|
CODE: |
2614
|
8
|
|
|
|
|
|
RETVAL = _overload_sub (aTHX_ a, b, third); |
2615
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2616
|
|
|
|
|
|
|
|
2617
|
|
|
|
|
|
|
SV * |
2618
|
|
|
|
|
|
|
_overload_sqrt (a, b, third) |
2619
|
|
|
|
|
|
|
SV * a |
2620
|
|
|
|
|
|
|
SV * b |
2621
|
|
|
|
|
|
|
SV * third |
2622
|
|
|
|
|
|
|
CODE: |
2623
|
1
|
|
|
|
|
|
RETVAL = _overload_sqrt (aTHX_ a, b, third); |
2624
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2625
|
|
|
|
|
|
|
|
2626
|
|
|
|
|
|
|
SV * |
2627
|
|
|
|
|
|
|
_overload_pow_eq (a, b, third) |
2628
|
|
|
|
|
|
|
SV * a |
2629
|
|
|
|
|
|
|
SV * b |
2630
|
|
|
|
|
|
|
SV * third |
2631
|
|
|
|
|
|
|
CODE: |
2632
|
4
|
|
|
|
|
|
RETVAL = _overload_pow_eq (aTHX_ a, b, third); |
2633
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2634
|
|
|
|
|
|
|
|
2635
|
|
|
|
|
|
|
SV * |
2636
|
|
|
|
|
|
|
_overload_mul_eq (a, b, third) |
2637
|
|
|
|
|
|
|
SV * a |
2638
|
|
|
|
|
|
|
SV * b |
2639
|
|
|
|
|
|
|
SV * third |
2640
|
|
|
|
|
|
|
CODE: |
2641
|
7
|
|
|
|
|
|
RETVAL = _overload_mul_eq (aTHX_ a, b, third); |
2642
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2643
|
|
|
|
|
|
|
|
2644
|
|
|
|
|
|
|
SV * |
2645
|
|
|
|
|
|
|
_overload_add_eq (a, b, third) |
2646
|
|
|
|
|
|
|
SV * a |
2647
|
|
|
|
|
|
|
SV * b |
2648
|
|
|
|
|
|
|
SV * third |
2649
|
|
|
|
|
|
|
CODE: |
2650
|
6
|
|
|
|
|
|
RETVAL = _overload_add_eq (aTHX_ a, b, third); |
2651
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2652
|
|
|
|
|
|
|
|
2653
|
|
|
|
|
|
|
SV * |
2654
|
|
|
|
|
|
|
_overload_div_eq (a, b, third) |
2655
|
|
|
|
|
|
|
SV * a |
2656
|
|
|
|
|
|
|
SV * b |
2657
|
|
|
|
|
|
|
SV * third |
2658
|
|
|
|
|
|
|
CODE: |
2659
|
5
|
|
|
|
|
|
RETVAL = _overload_div_eq (aTHX_ a, b, third); |
2660
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2661
|
|
|
|
|
|
|
|
2662
|
|
|
|
|
|
|
SV * |
2663
|
|
|
|
|
|
|
_overload_sub_eq (a, b, third) |
2664
|
|
|
|
|
|
|
SV * a |
2665
|
|
|
|
|
|
|
SV * b |
2666
|
|
|
|
|
|
|
SV * third |
2667
|
|
|
|
|
|
|
CODE: |
2668
|
5
|
|
|
|
|
|
RETVAL = _overload_sub_eq (aTHX_ a, b, third); |
2669
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2670
|
|
|
|
|
|
|
|
2671
|
|
|
|
|
|
|
SV * |
2672
|
|
|
|
|
|
|
_overload_copy (a, second, third) |
2673
|
|
|
|
|
|
|
SV * a |
2674
|
|
|
|
|
|
|
SV * second |
2675
|
|
|
|
|
|
|
SV * third |
2676
|
|
|
|
|
|
|
CODE: |
2677
|
4
|
|
|
|
|
|
RETVAL = _overload_copy (aTHX_ a, second, third); |
2678
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2679
|
|
|
|
|
|
|
|
2680
|
|
|
|
|
|
|
SV * |
2681
|
|
|
|
|
|
|
_overload_abs (rop, second, third) |
2682
|
|
|
|
|
|
|
SV * rop |
2683
|
|
|
|
|
|
|
SV * second |
2684
|
|
|
|
|
|
|
SV * third |
2685
|
|
|
|
|
|
|
CODE: |
2686
|
1
|
|
|
|
|
|
RETVAL = _overload_abs (aTHX_ rop, second, third); |
2687
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2688
|
|
|
|
|
|
|
|
2689
|
|
|
|
|
|
|
SV * |
2690
|
|
|
|
|
|
|
_overload_exp (a, b, third) |
2691
|
|
|
|
|
|
|
SV * a |
2692
|
|
|
|
|
|
|
SV * b |
2693
|
|
|
|
|
|
|
SV * third |
2694
|
|
|
|
|
|
|
CODE: |
2695
|
1
|
|
|
|
|
|
RETVAL = _overload_exp (aTHX_ a, b, third); |
2696
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2697
|
|
|
|
|
|
|
|
2698
|
|
|
|
|
|
|
SV * |
2699
|
|
|
|
|
|
|
_overload_log (a, b, third) |
2700
|
|
|
|
|
|
|
SV * a |
2701
|
|
|
|
|
|
|
SV * b |
2702
|
|
|
|
|
|
|
SV * third |
2703
|
|
|
|
|
|
|
CODE: |
2704
|
1
|
|
|
|
|
|
RETVAL = _overload_log (aTHX_ a, b, third); |
2705
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2706
|
|
|
|
|
|
|
|
2707
|
|
|
|
|
|
|
SV * |
2708
|
|
|
|
|
|
|
_overload_sin (a, b, third) |
2709
|
|
|
|
|
|
|
SV * a |
2710
|
|
|
|
|
|
|
SV * b |
2711
|
|
|
|
|
|
|
SV * third |
2712
|
|
|
|
|
|
|
CODE: |
2713
|
1
|
|
|
|
|
|
RETVAL = _overload_sin (aTHX_ a, b, third); |
2714
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2715
|
|
|
|
|
|
|
|
2716
|
|
|
|
|
|
|
SV * |
2717
|
|
|
|
|
|
|
_overload_cos (a, b, third) |
2718
|
|
|
|
|
|
|
SV * a |
2719
|
|
|
|
|
|
|
SV * b |
2720
|
|
|
|
|
|
|
SV * third |
2721
|
|
|
|
|
|
|
CODE: |
2722
|
1
|
|
|
|
|
|
RETVAL = _overload_cos (aTHX_ a, b, third); |
2723
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2724
|
|
|
|
|
|
|
|
2725
|
|
|
|
|
|
|
SV * |
2726
|
|
|
|
|
|
|
_overload_atan2 (a, b, third) |
2727
|
|
|
|
|
|
|
SV * a |
2728
|
|
|
|
|
|
|
SV * b |
2729
|
|
|
|
|
|
|
SV * third |
2730
|
|
|
|
|
|
|
CODE: |
2731
|
1
|
|
|
|
|
|
RETVAL = _overload_atan2 (aTHX_ a, b, third); |
2732
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2733
|
|
|
|
|
|
|
|
2734
|
|
|
|
|
|
|
SV * |
2735
|
|
|
|
|
|
|
get_nanq () |
2736
|
|
|
|
|
|
|
CODE: |
2737
|
4
|
|
|
|
|
|
RETVAL = get_nanq (aTHX); |
2738
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2739
|
|
|
|
|
|
|
|
2740
|
|
|
|
|
|
|
|
2741
|
|
|
|
|
|
|
SV * |
2742
|
|
|
|
|
|
|
get_infq () |
2743
|
|
|
|
|
|
|
CODE: |
2744
|
2
|
|
|
|
|
|
RETVAL = get_infq (aTHX); |
2745
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2746
|
|
|
|
|
|
|
|
2747
|
|
|
|
|
|
|
|
2748
|
|
|
|
|
|
|
SV * |
2749
|
|
|
|
|
|
|
get_neg_infq () |
2750
|
|
|
|
|
|
|
CODE: |
2751
|
0
|
|
|
|
|
|
RETVAL = get_neg_infq (aTHX); |
2752
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2753
|
|
|
|
|
|
|
|
2754
|
|
|
|
|
|
|
|
2755
|
|
|
|
|
|
|
SV * |
2756
|
|
|
|
|
|
|
_complex_type () |
2757
|
|
|
|
|
|
|
CODE: |
2758
|
0
|
|
|
|
|
|
RETVAL = _complex_type (aTHX); |
2759
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2760
|
|
|
|
|
|
|
|
2761
|
|
|
|
|
|
|
|
2762
|
|
|
|
|
|
|
SV * |
2763
|
|
|
|
|
|
|
_double_type () |
2764
|
|
|
|
|
|
|
CODE: |
2765
|
0
|
|
|
|
|
|
RETVAL = _double_type (aTHX); |
2766
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2767
|
|
|
|
|
|
|
|
2768
|
|
|
|
|
|
|
|
2769
|
|
|
|
|
|
|
SV * |
2770
|
|
|
|
|
|
|
_get_nv (x) |
2771
|
|
|
|
|
|
|
SV * x |
2772
|
|
|
|
|
|
|
CODE: |
2773
|
0
|
|
|
|
|
|
RETVAL = _get_nv (aTHX_ x); |
2774
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2775
|
|
|
|
|
|
|
|
2776
|
|
|
|
|
|
|
SV * |
2777
|
|
|
|
|
|
|
_which_package (b) |
2778
|
|
|
|
|
|
|
SV * b |
2779
|
|
|
|
|
|
|
CODE: |
2780
|
0
|
|
|
|
|
|
RETVAL = _which_package (aTHX_ b); |
2781
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2782
|
|
|
|
|
|
|
|
2783
|
|
|
|
|
|
|
SV * |
2784
|
|
|
|
|
|
|
_wrap_count () |
2785
|
|
|
|
|
|
|
CODE: |
2786
|
0
|
|
|
|
|
|
RETVAL = _wrap_count (aTHX); |
2787
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2788
|
|
|
|
|
|
|
|
2789
|
|
|
|
|
|
|
|
2790
|
|
|
|
|
|
|
SV * |
2791
|
|
|
|
|
|
|
_ivsize () |
2792
|
|
|
|
|
|
|
CODE: |
2793
|
0
|
|
|
|
|
|
RETVAL = _ivsize (aTHX); |
2794
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2795
|
|
|
|
|
|
|
|
2796
|
|
|
|
|
|
|
|
2797
|
|
|
|
|
|
|
SV * |
2798
|
|
|
|
|
|
|
_nvsize () |
2799
|
|
|
|
|
|
|
CODE: |
2800
|
0
|
|
|
|
|
|
RETVAL = _nvsize (aTHX); |
2801
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2802
|
|
|
|
|
|
|
|
2803
|
|
|
|
|
|
|
|
2804
|
|
|
|
|
|
|
SV * |
2805
|
|
|
|
|
|
|
_doublesize () |
2806
|
|
|
|
|
|
|
CODE: |
2807
|
0
|
|
|
|
|
|
RETVAL = _doublesize (aTHX); |
2808
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2809
|
|
|
|
|
|
|
|
2810
|
|
|
|
|
|
|
|
2811
|
|
|
|
|
|
|
SV * |
2812
|
|
|
|
|
|
|
_longdoublesize () |
2813
|
|
|
|
|
|
|
CODE: |
2814
|
0
|
|
|
|
|
|
RETVAL = _longdoublesize (aTHX); |
2815
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2816
|
|
|
|
|
|
|
|
2817
|
|
|
|
|
|
|
|
2818
|
|
|
|
|
|
|
SV * |
2819
|
|
|
|
|
|
|
_float128size () |
2820
|
|
|
|
|
|
|
CODE: |
2821
|
0
|
|
|
|
|
|
RETVAL = _float128size (aTHX); |
2822
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2823
|
|
|
|
|
|
|
|
2824
|
|
|
|
|
|
|
|
2825
|
|
|
|
|
|
|
SV * |
2826
|
|
|
|
|
|
|
_double_Complexsize () |
2827
|
|
|
|
|
|
|
CODE: |
2828
|
0
|
|
|
|
|
|
RETVAL = _double_Complexsize (aTHX); |
2829
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2830
|
|
|
|
|
|
|
|
2831
|
|
|
|
|
|
|
|
2832
|
|
|
|
|
|
|
SV * |
2833
|
|
|
|
|
|
|
_longdouble_Complexsize () |
2834
|
|
|
|
|
|
|
CODE: |
2835
|
0
|
|
|
|
|
|
RETVAL = _longdouble_Complexsize (aTHX); |
2836
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2837
|
|
|
|
|
|
|
|
2838
|
|
|
|
|
|
|
|
2839
|
|
|
|
|
|
|
SV * |
2840
|
|
|
|
|
|
|
_float128_Complexsize () |
2841
|
|
|
|
|
|
|
CODE: |
2842
|
0
|
|
|
|
|
|
RETVAL = _float128_Complexsize (aTHX); |
2843
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2844
|
|
|
|
|
|
|
|
2845
|
|
|
|
|
|
|
|
2846
|
|
|
|
|
|
|
void |
2847
|
|
|
|
|
|
|
_q_to_str (ld) |
2848
|
|
|
|
|
|
|
SV * ld |
2849
|
|
|
|
|
|
|
PREINIT: |
2850
|
|
|
|
|
|
|
I32* temp; |
2851
|
|
|
|
|
|
|
PPCODE: |
2852
|
13
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2853
|
13
|
|
|
|
|
|
_q_to_str(aTHX_ ld); |
2854
|
13
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2855
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2856
|
0
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2857
|
0
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2858
|
|
|
|
|
|
|
} |
2859
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2860
|
13
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2861
|
|
|
|
|
|
|
|
2862
|
|
|
|
|
|
|
void |
2863
|
|
|
|
|
|
|
_q_to_strp (ld, decimal_prec) |
2864
|
|
|
|
|
|
|
SV * ld |
2865
|
|
|
|
|
|
|
int decimal_prec |
2866
|
|
|
|
|
|
|
PREINIT: |
2867
|
|
|
|
|
|
|
I32* temp; |
2868
|
|
|
|
|
|
|
PPCODE: |
2869
|
3
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2870
|
3
|
|
|
|
|
|
_q_to_strp(aTHX_ ld, decimal_prec); |
2871
|
3
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2872
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2873
|
0
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2874
|
0
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2875
|
|
|
|
|
|
|
} |
2876
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2877
|
3
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2878
|
|
|
|
|
|
|
|
2879
|
|
|
|
|
|
|
SV * |
2880
|
|
|
|
|
|
|
_LDBL_DIG () |
2881
|
|
|
|
|
|
|
CODE: |
2882
|
0
|
|
|
|
|
|
RETVAL = _LDBL_DIG (aTHX); |
2883
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2884
|
|
|
|
|
|
|
|
2885
|
|
|
|
|
|
|
|
2886
|
|
|
|
|
|
|
SV * |
2887
|
|
|
|
|
|
|
_FLT128_DIG () |
2888
|
|
|
|
|
|
|
CODE: |
2889
|
0
|
|
|
|
|
|
RETVAL = _FLT128_DIG (aTHX); |
2890
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2891
|
|
|
|
|
|
|
|
2892
|
|
|
|
|
|
|
|
2893
|
|
|
|
|
|
|
SV * |
2894
|
|
|
|
|
|
|
_get_xs_version () |
2895
|
|
|
|
|
|
|
CODE: |
2896
|
0
|
|
|
|
|
|
RETVAL = _get_xs_version (aTHX); |
2897
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2898
|
|
|
|
|
|
|
|
2899
|
|
|
|
|
|
|
|
2900
|
|
|
|
|
|
|
SV * |
2901
|
|
|
|
|
|
|
_itsa (a) |
2902
|
|
|
|
|
|
|
SV * a |
2903
|
|
|
|
|
|
|
CODE: |
2904
|
20
|
|
|
|
|
|
RETVAL = _itsa (aTHX_ a); |
2905
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2906
|
|
|
|
|
|
|
|
2907
|
|
|
|
|
|
|
int |
2908
|
|
|
|
|
|
|
_mingw_w64_bug () |
2909
|
|
|
|
|
|
|
|
2910
|
|
|
|
|
|
|
|
2911
|
|
|
|
|
|
|
int |
2912
|
|
|
|
|
|
|
_gcc_tan_bug () |
2913
|
|
|
|
|
|
|
|
2914
|
|
|
|
|
|
|
|
2915
|
|
|
|
|
|
|
int |
2916
|
|
|
|
|
|
|
nnumflag () |
2917
|
|
|
|
|
|
|
|
2918
|
|
|
|
|
|
|
|
2919
|
|
|
|
|
|
|
void |
2920
|
|
|
|
|
|
|
clear_nnum () |
2921
|
|
|
|
|
|
|
|
2922
|
|
|
|
|
|
|
PREINIT: |
2923
|
|
|
|
|
|
|
I32* temp; |
2924
|
|
|
|
|
|
|
PPCODE: |
2925
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2926
|
1
|
|
|
|
|
|
clear_nnum(); |
2927
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2928
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2929
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2930
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2931
|
|
|
|
|
|
|
} |
2932
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2933
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2934
|
|
|
|
|
|
|
|
2935
|
|
|
|
|
|
|
void |
2936
|
|
|
|
|
|
|
set_nnum (x) |
2937
|
|
|
|
|
|
|
int x |
2938
|
|
|
|
|
|
|
PREINIT: |
2939
|
|
|
|
|
|
|
I32* temp; |
2940
|
|
|
|
|
|
|
PPCODE: |
2941
|
1
|
|
|
|
|
|
temp = PL_markstack_ptr++; |
2942
|
1
|
|
|
|
|
|
set_nnum(x); |
2943
|
1
|
50
|
|
|
|
|
if (PL_markstack_ptr != temp) { |
2944
|
|
|
|
|
|
|
/* truly void, because dXSARGS not invoked */ |
2945
|
1
|
|
|
|
|
|
PL_markstack_ptr = temp; |
2946
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; /* return empty stack */ |
2947
|
|
|
|
|
|
|
} |
2948
|
|
|
|
|
|
|
/* must have used dXSARGS; list context implied */ |
2949
|
0
|
|
|
|
|
|
return; /* assume stack size is correct */ |
2950
|
|
|
|
|
|
|
|
2951
|
|
|
|
|
|
|
int |
2952
|
|
|
|
|
|
|
_lln (x) |
2953
|
|
|
|
|
|
|
SV * x |
2954
|
|
|
|
|
|
|
CODE: |
2955
|
0
|
|
|
|
|
|
RETVAL = _lln (aTHX_ x); |
2956
|
|
|
|
|
|
|
OUTPUT: RETVAL |
2957
|
|
|
|
|
|
|
|