Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
9e720e39
Kaydet (Commit)
9e720e39
authored
Tem 21, 1996
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
complex -> Py_complex
üst
f5030abc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
96 additions
and
96 deletions
+96
-96
cmathmodule.c
Modules/cmathmodule.c
+56
-56
complexobject.c
Objects/complexobject.c
+40
-40
No files found.
Modules/cmathmodule.c
Dosyayı görüntüle @
9e720e39
...
@@ -29,137 +29,137 @@
...
@@ -29,137 +29,137 @@
/* First, the C functions that do the real work */
/* First, the C functions that do the real work */
/* constants */
/* constants */
static
complex
c_1
=
{
1
.,
0
.};
static
Py_
complex
c_1
=
{
1
.,
0
.};
static
complex
c_half
=
{
0
.
5
,
0
.};
static
Py_
complex
c_half
=
{
0
.
5
,
0
.};
static
complex
c_i
=
{
0
.,
1
.};
static
Py_
complex
c_i
=
{
0
.,
1
.};
static
complex
c_i2
=
{
0
.,
0
.
5
};
static
Py_
complex
c_i2
=
{
0
.,
0
.
5
};
static
complex
c_mi
=
{
0
.,
-
1
.};
static
Py_
complex
c_mi
=
{
0
.,
-
1
.};
static
complex
c_pi2
=
{
M_PI
/
2
.,
0
.};
static
Py_
complex
c_pi2
=
{
M_PI
/
2
.,
0
.};
/* forward declarations */
/* forward declarations */
staticforward
complex
c_log
();
staticforward
Py_
complex
c_log
();
staticforward
complex
c_prodi
();
staticforward
Py_
complex
c_prodi
();
staticforward
complex
c_sqrt
();
staticforward
Py_
complex
c_sqrt
();
static
complex
c_acos
(
x
)
static
Py_
complex
c_acos
(
x
)
complex
x
;
Py_
complex
x
;
{
{
return
c_neg
(
c_prodi
(
c_log
(
c_sum
(
x
,
c_prod
(
c_i
,
return
c_neg
(
c_prodi
(
c_log
(
c_sum
(
x
,
c_prod
(
c_i
,
c_sqrt
(
c_diff
(
c_1
,
c_prod
(
x
,
x
))))))));
c_sqrt
(
c_diff
(
c_1
,
c_prod
(
x
,
x
))))))));
}
}
static
complex
c_acosh
(
x
)
static
Py_
complex
c_acosh
(
x
)
complex
x
;
Py_
complex
x
;
{
{
return
c_log
(
c_sum
(
x
,
c_prod
(
c_i
,
return
c_log
(
c_sum
(
x
,
c_prod
(
c_i
,
c_sqrt
(
c_diff
(
c_1
,
c_prod
(
x
,
x
))))));
c_sqrt
(
c_diff
(
c_1
,
c_prod
(
x
,
x
))))));
}
}
static
complex
c_asin
(
x
)
static
Py_
complex
c_asin
(
x
)
complex
x
;
Py_
complex
x
;
{
{
return
c_neg
(
c_prodi
(
c_log
(
c_sum
(
c_prod
(
c_i
,
x
),
return
c_neg
(
c_prodi
(
c_log
(
c_sum
(
c_prod
(
c_i
,
x
),
c_sqrt
(
c_diff
(
c_1
,
c_prod
(
x
,
x
)))))));
c_sqrt
(
c_diff
(
c_1
,
c_prod
(
x
,
x
)))))));
}
}
static
complex
c_asinh
(
x
)
static
Py_
complex
c_asinh
(
x
)
complex
x
;
Py_
complex
x
;
{
{
return
c_neg
(
c_log
(
c_diff
(
c_sqrt
(
c_sum
(
c_1
,
c_prod
(
x
,
x
))),
x
)));
return
c_neg
(
c_log
(
c_diff
(
c_sqrt
(
c_sum
(
c_1
,
c_prod
(
x
,
x
))),
x
)));
}
}
static
complex
c_atan
(
x
)
static
Py_
complex
c_atan
(
x
)
complex
x
;
Py_
complex
x
;
{
{
return
c_prod
(
c_i2
,
c_log
(
c_quot
(
c_sum
(
c_i
,
x
),
c_diff
(
c_i
,
x
))));
return
c_prod
(
c_i2
,
c_log
(
c_quot
(
c_sum
(
c_i
,
x
),
c_diff
(
c_i
,
x
))));
}
}
static
complex
c_atanh
(
x
)
static
Py_
complex
c_atanh
(
x
)
complex
x
;
Py_
complex
x
;
{
{
return
c_prod
(
c_half
,
c_log
(
c_quot
(
c_sum
(
c_1
,
x
),
c_diff
(
c_1
,
x
))));
return
c_prod
(
c_half
,
c_log
(
c_quot
(
c_sum
(
c_1
,
x
),
c_diff
(
c_1
,
x
))));
}
}
static
complex
c_cos
(
x
)
static
Py_
complex
c_cos
(
x
)
complex
x
;
Py_
complex
x
;
{
{
complex
r
;
Py_
complex
r
;
r
.
real
=
cos
(
x
.
real
)
*
cosh
(
x
.
imag
);
r
.
real
=
cos
(
x
.
real
)
*
cosh
(
x
.
imag
);
r
.
imag
=
-
sin
(
x
.
real
)
*
sinh
(
x
.
imag
);
r
.
imag
=
-
sin
(
x
.
real
)
*
sinh
(
x
.
imag
);
return
r
;
return
r
;
}
}
static
complex
c_cosh
(
x
)
static
Py_
complex
c_cosh
(
x
)
complex
x
;
Py_
complex
x
;
{
{
complex
r
;
Py_
complex
r
;
r
.
real
=
cos
(
x
.
imag
)
*
cosh
(
x
.
real
);
r
.
real
=
cos
(
x
.
imag
)
*
cosh
(
x
.
real
);
r
.
imag
=
sin
(
x
.
imag
)
*
sinh
(
x
.
real
);
r
.
imag
=
sin
(
x
.
imag
)
*
sinh
(
x
.
real
);
return
r
;
return
r
;
}
}
static
complex
c_exp
(
x
)
static
Py_
complex
c_exp
(
x
)
complex
x
;
Py_
complex
x
;
{
{
complex
r
;
Py_
complex
r
;
double
l
=
exp
(
x
.
real
);
double
l
=
exp
(
x
.
real
);
r
.
real
=
l
*
cos
(
x
.
imag
);
r
.
real
=
l
*
cos
(
x
.
imag
);
r
.
imag
=
l
*
sin
(
x
.
imag
);
r
.
imag
=
l
*
sin
(
x
.
imag
);
return
r
;
return
r
;
}
}
static
complex
c_log
(
x
)
static
Py_
complex
c_log
(
x
)
complex
x
;
Py_
complex
x
;
{
{
complex
r
;
Py_
complex
r
;
double
l
=
hypot
(
x
.
real
,
x
.
imag
);
double
l
=
hypot
(
x
.
real
,
x
.
imag
);
r
.
imag
=
atan2
(
x
.
imag
,
x
.
real
);
r
.
imag
=
atan2
(
x
.
imag
,
x
.
real
);
r
.
real
=
log
(
l
);
r
.
real
=
log
(
l
);
return
r
;
return
r
;
}
}
static
complex
c_log10
(
x
)
static
Py_
complex
c_log10
(
x
)
complex
x
;
Py_
complex
x
;
{
{
complex
r
;
Py_
complex
r
;
double
l
=
hypot
(
x
.
real
,
x
.
imag
);
double
l
=
hypot
(
x
.
real
,
x
.
imag
);
r
.
imag
=
atan2
(
x
.
imag
,
x
.
real
)
/
log
(
10
.);
r
.
imag
=
atan2
(
x
.
imag
,
x
.
real
)
/
log
(
10
.);
r
.
real
=
log10
(
l
);
r
.
real
=
log10
(
l
);
return
r
;
return
r
;
}
}
static
complex
c_prodi
(
x
)
static
Py_
complex
c_prodi
(
x
)
complex
x
;
Py_
complex
x
;
{
{
complex
r
;
Py_
complex
r
;
r
.
real
=
-
x
.
imag
;
r
.
real
=
-
x
.
imag
;
r
.
imag
=
x
.
real
;
r
.
imag
=
x
.
real
;
return
r
;
return
r
;
}
}
static
complex
c_sin
(
x
)
static
Py_
complex
c_sin
(
x
)
complex
x
;
Py_
complex
x
;
{
{
complex
r
;
Py_
complex
r
;
r
.
real
=
sin
(
x
.
real
)
*
cosh
(
x
.
imag
);
r
.
real
=
sin
(
x
.
real
)
*
cosh
(
x
.
imag
);
r
.
imag
=
cos
(
x
.
real
)
*
sinh
(
x
.
imag
);
r
.
imag
=
cos
(
x
.
real
)
*
sinh
(
x
.
imag
);
return
r
;
return
r
;
}
}
static
complex
c_sinh
(
x
)
static
Py_
complex
c_sinh
(
x
)
complex
x
;
Py_
complex
x
;
{
{
complex
r
;
Py_
complex
r
;
r
.
real
=
cos
(
x
.
imag
)
*
sinh
(
x
.
real
);
r
.
real
=
cos
(
x
.
imag
)
*
sinh
(
x
.
real
);
r
.
imag
=
sin
(
x
.
imag
)
*
cosh
(
x
.
real
);
r
.
imag
=
sin
(
x
.
imag
)
*
cosh
(
x
.
real
);
return
r
;
return
r
;
}
}
static
complex
c_sqrt
(
x
)
static
Py_
complex
c_sqrt
(
x
)
complex
x
;
Py_
complex
x
;
{
{
complex
r
;
Py_
complex
r
;
double
s
,
d
;
double
s
,
d
;
if
(
x
.
real
==
0
.
&&
x
.
imag
==
0
.)
if
(
x
.
real
==
0
.
&&
x
.
imag
==
0
.)
r
=
x
;
r
=
x
;
...
@@ -182,10 +182,10 @@ static complex c_sqrt(x)
...
@@ -182,10 +182,10 @@ static complex c_sqrt(x)
return
r
;
return
r
;
}
}
static
complex
c_tan
(
x
)
static
Py_
complex
c_tan
(
x
)
complex
x
;
Py_
complex
x
;
{
{
complex
r
;
Py_
complex
r
;
double
sr
,
cr
,
shi
,
chi
;
double
sr
,
cr
,
shi
,
chi
;
double
rs
,
is
,
rc
,
ic
;
double
rs
,
is
,
rc
,
ic
;
double
d
;
double
d
;
...
@@ -203,10 +203,10 @@ static complex c_tan(x)
...
@@ -203,10 +203,10 @@ static complex c_tan(x)
return
r
;
return
r
;
}
}
static
complex
c_tanh
(
x
)
static
Py_
complex
c_tanh
(
x
)
complex
x
;
Py_
complex
x
;
{
{
complex
r
;
Py_
complex
r
;
double
si
,
ci
,
shr
,
chr
;
double
si
,
ci
,
shr
,
chr
;
double
rs
,
is
,
rc
,
ic
;
double
rs
,
is
,
rc
,
ic
;
double
d
;
double
d
;
...
@@ -242,9 +242,9 @@ math_error()
...
@@ -242,9 +242,9 @@ math_error()
static
object
*
static
object
*
math_1
(
args
,
func
)
math_1
(
args
,
func
)
object
*
args
;
object
*
args
;
complex
(
*
func
)
FPROTO
((
complex
));
Py_complex
(
*
func
)
FPROTO
((
Py_
complex
));
{
{
complex
x
;
Py_
complex
x
;
if
(
!
PyArg_ParseTuple
(
args
,
"D"
,
&
x
))
if
(
!
PyArg_ParseTuple
(
args
,
"D"
,
&
x
))
return
NULL
;
return
NULL
;
errno
=
0
;
errno
=
0
;
...
...
Objects/complexobject.c
Dosyayı görüntüle @
9e720e39
...
@@ -56,48 +56,48 @@ extern double pow PROTO((double, double));
...
@@ -56,48 +56,48 @@ extern double pow PROTO((double, double));
/* elementary operations on complex numbers */
/* elementary operations on complex numbers */
static
int
c_error
;
static
int
c_error
;
static
complex
c_1
=
{
1
.,
0
.};
static
Py_
complex
c_1
=
{
1
.,
0
.};
complex
c_sum
(
a
,
b
)
Py_
complex
c_sum
(
a
,
b
)
complex
a
,
b
;
Py_
complex
a
,
b
;
{
{
complex
r
;
Py_
complex
r
;
r
.
real
=
a
.
real
+
b
.
real
;
r
.
real
=
a
.
real
+
b
.
real
;
r
.
imag
=
a
.
imag
+
b
.
imag
;
r
.
imag
=
a
.
imag
+
b
.
imag
;
return
r
;
return
r
;
}
}
complex
c_diff
(
a
,
b
)
Py_
complex
c_diff
(
a
,
b
)
complex
a
,
b
;
Py_
complex
a
,
b
;
{
{
complex
r
;
Py_
complex
r
;
r
.
real
=
a
.
real
-
b
.
real
;
r
.
real
=
a
.
real
-
b
.
real
;
r
.
imag
=
a
.
imag
-
b
.
imag
;
r
.
imag
=
a
.
imag
-
b
.
imag
;
return
r
;
return
r
;
}
}
complex
c_neg
(
a
)
Py_
complex
c_neg
(
a
)
complex
a
;
Py_
complex
a
;
{
{
complex
r
;
Py_
complex
r
;
r
.
real
=
-
a
.
real
;
r
.
real
=
-
a
.
real
;
r
.
imag
=
-
a
.
imag
;
r
.
imag
=
-
a
.
imag
;
return
r
;
return
r
;
}
}
complex
c_prod
(
a
,
b
)
Py_
complex
c_prod
(
a
,
b
)
complex
a
,
b
;
Py_
complex
a
,
b
;
{
{
complex
r
;
Py_
complex
r
;
r
.
real
=
a
.
real
*
b
.
real
-
a
.
imag
*
b
.
imag
;
r
.
real
=
a
.
real
*
b
.
real
-
a
.
imag
*
b
.
imag
;
r
.
imag
=
a
.
real
*
b
.
imag
+
a
.
imag
*
b
.
real
;
r
.
imag
=
a
.
real
*
b
.
imag
+
a
.
imag
*
b
.
real
;
return
r
;
return
r
;
}
}
complex
c_quot
(
a
,
b
)
Py_
complex
c_quot
(
a
,
b
)
complex
a
,
b
;
Py_
complex
a
,
b
;
{
{
complex
r
;
Py_
complex
r
;
double
d
=
b
.
real
*
b
.
real
+
b
.
imag
*
b
.
imag
;
double
d
=
b
.
real
*
b
.
real
+
b
.
imag
*
b
.
imag
;
if
(
d
==
0
.)
if
(
d
==
0
.)
c_error
=
1
;
c_error
=
1
;
...
@@ -106,10 +106,10 @@ complex c_quot(a,b)
...
@@ -106,10 +106,10 @@ complex c_quot(a,b)
return
r
;
return
r
;
}
}
complex
c_pow
(
a
,
b
)
Py_
complex
c_pow
(
a
,
b
)
complex
a
,
b
;
Py_
complex
a
,
b
;
{
{
complex
r
;
Py_
complex
r
;
double
vabs
,
len
,
at
,
phase
;
double
vabs
,
len
,
at
,
phase
;
if
(
b
.
real
==
0
.
&&
b
.
imag
==
0
.)
{
if
(
b
.
real
==
0
.
&&
b
.
imag
==
0
.)
{
r
.
real
=
1
.;
r
.
real
=
1
.;
...
@@ -136,12 +136,12 @@ complex c_pow(a,b)
...
@@ -136,12 +136,12 @@ complex c_pow(a,b)
return
r
;
return
r
;
}
}
static
complex
c_powu
(
x
,
n
)
static
Py_
complex
c_powu
(
x
,
n
)
complex
x
;
Py_
complex
x
;
long
n
;
long
n
;
{
{
complex
r
=
c_1
;
Py_
complex
r
=
c_1
;
complex
p
=
x
;
Py_
complex
p
=
x
;
long
mask
=
1
;
long
mask
=
1
;
while
(
mask
>
0
&&
n
>=
mask
)
{
while
(
mask
>
0
&&
n
>=
mask
)
{
if
(
n
&
mask
)
if
(
n
&
mask
)
...
@@ -152,11 +152,11 @@ static complex c_powu(x, n)
...
@@ -152,11 +152,11 @@ static complex c_powu(x, n)
return
r
;
return
r
;
}
}
static
complex
c_powi
(
x
,
n
)
static
Py_
complex
c_powi
(
x
,
n
)
complex
x
;
Py_
complex
x
;
long
n
;
long
n
;
{
{
complex
cn
;
Py_
complex
cn
;
if
(
n
>
100
||
n
<
-
100
)
{
if
(
n
>
100
||
n
<
-
100
)
{
cn
.
real
=
(
double
)
n
;
cn
.
real
=
(
double
)
n
;
...
@@ -171,7 +171,7 @@ static complex c_powi(x, n)
...
@@ -171,7 +171,7 @@ static complex c_powi(x, n)
}
}
PyObject
*
PyObject
*
PyComplex_FromCComplex
(
complex
cval
)
PyComplex_FromCComplex
(
Py_
complex
cval
)
{
{
register
complexobject
*
op
=
(
complexobject
*
)
malloc
(
sizeof
(
complexobject
));
register
complexobject
*
op
=
(
complexobject
*
)
malloc
(
sizeof
(
complexobject
));
if
(
op
==
NULL
)
if
(
op
==
NULL
)
...
@@ -184,7 +184,7 @@ PyComplex_FromCComplex(complex cval)
...
@@ -184,7 +184,7 @@ PyComplex_FromCComplex(complex cval)
PyObject
*
PyObject
*
PyComplex_FromDoubles
(
double
real
,
double
imag
)
{
PyComplex_FromDoubles
(
double
real
,
double
imag
)
{
complex
c
;
Py_
complex
c
;
c
.
real
=
real
;
c
.
real
=
real
;
c
.
imag
=
imag
;
c
.
imag
=
imag
;
return
PyComplex_FromCComplex
(
c
);
return
PyComplex_FromCComplex
(
c
);
...
@@ -208,9 +208,9 @@ PyComplex_ImagAsDouble(PyObject *op) {
...
@@ -208,9 +208,9 @@ PyComplex_ImagAsDouble(PyObject *op) {
}
}
}
}
complex
Py_
complex
PyComplex_AsCComplex
(
PyObject
*
op
)
{
PyComplex_AsCComplex
(
PyObject
*
op
)
{
complex
cv
;
Py_
complex
cv
;
if
(
PyComplex_Check
(
op
))
{
if
(
PyComplex_Check
(
op
))
{
return
((
PyComplexObject
*
)
op
)
->
cval
;
return
((
PyComplexObject
*
)
op
)
->
cval
;
}
else
{
}
else
{
...
@@ -266,8 +266,8 @@ complex_compare(v, w)
...
@@ -266,8 +266,8 @@ complex_compare(v, w)
{
{
/* Note: "greater" and "smaller" have no meaning for complex numbers,
/* Note: "greater" and "smaller" have no meaning for complex numbers,
but Python requires that they be defined nevertheless. */
but Python requires that they be defined nevertheless. */
complex
i
=
v
->
cval
;
Py_
complex
i
=
v
->
cval
;
complex
j
=
w
->
cval
;
Py_
complex
j
=
w
->
cval
;
if
(
i
.
real
==
j
.
real
&&
i
.
imag
==
j
.
imag
)
if
(
i
.
real
==
j
.
real
&&
i
.
imag
==
j
.
imag
)
return
0
;
return
0
;
else
if
(
i
.
real
!=
j
.
real
)
else
if
(
i
.
real
!=
j
.
real
)
...
@@ -348,7 +348,7 @@ complex_div(v, w)
...
@@ -348,7 +348,7 @@ complex_div(v, w)
complexobject
*
v
;
complexobject
*
v
;
complexobject
*
w
;
complexobject
*
w
;
{
{
complex
quot
;
Py_
complex
quot
;
c_error
=
0
;
c_error
=
0
;
quot
=
c_quot
(
v
->
cval
,
w
->
cval
);
quot
=
c_quot
(
v
->
cval
,
w
->
cval
);
if
(
c_error
==
1
)
{
if
(
c_error
==
1
)
{
...
@@ -365,8 +365,8 @@ complex_pow(v, w, z)
...
@@ -365,8 +365,8 @@ complex_pow(v, w, z)
object
*
w
;
object
*
w
;
complexobject
*
z
;
complexobject
*
z
;
{
{
complex
p
;
Py_
complex
p
;
complex
exponent
;
Py_
complex
exponent
;
long
int_exponent
;
long
int_exponent
;
if
((
object
*
)
z
!=
None
)
{
if
((
object
*
)
z
!=
None
)
{
...
@@ -394,7 +394,7 @@ static object *
...
@@ -394,7 +394,7 @@ static object *
complex_neg
(
v
)
complex_neg
(
v
)
complexobject
*
v
;
complexobject
*
v
;
{
{
complex
neg
;
Py_
complex
neg
;
neg
.
real
=
-
v
->
cval
.
real
;
neg
.
real
=
-
v
->
cval
.
real
;
neg
.
imag
=
-
v
->
cval
.
imag
;
neg
.
imag
=
-
v
->
cval
.
imag
;
return
newcomplexobject
(
neg
);
return
newcomplexobject
(
neg
);
...
@@ -427,7 +427,7 @@ complex_coerce(pv, pw)
...
@@ -427,7 +427,7 @@ complex_coerce(pv, pw)
object
**
pv
;
object
**
pv
;
object
**
pw
;
object
**
pw
;
{
{
complex
cval
;
Py_
complex
cval
;
cval
.
imag
=
0
.;
cval
.
imag
=
0
.;
if
(
is_intobject
(
*
pw
))
{
if
(
is_intobject
(
*
pw
))
{
cval
.
real
=
(
double
)
getintvalue
(
*
pw
);
cval
.
real
=
(
double
)
getintvalue
(
*
pw
);
...
@@ -485,7 +485,7 @@ complex_new(self, args)
...
@@ -485,7 +485,7 @@ complex_new(self, args)
object
*
self
;
object
*
self
;
object
*
args
;
object
*
args
;
{
{
complex
cval
;
Py_
complex
cval
;
cval
.
imag
=
0
.;
cval
.
imag
=
0
.;
if
(
!
PyArg_ParseTuple
(
args
,
"d|d"
,
&
cval
.
real
,
&
cval
.
imag
))
if
(
!
PyArg_ParseTuple
(
args
,
"d|d"
,
&
cval
.
real
,
&
cval
.
imag
))
...
@@ -497,7 +497,7 @@ static object *
...
@@ -497,7 +497,7 @@ static object *
complex_conjugate
(
self
)
complex_conjugate
(
self
)
object
*
self
;
object
*
self
;
{
{
complex
c
=
((
complexobject
*
)
self
)
->
cval
;
Py_
complex
c
=
((
complexobject
*
)
self
)
->
cval
;
c
.
imag
=
-
c
.
imag
;
c
.
imag
=
-
c
.
imag
;
return
newcomplexobject
(
c
);
return
newcomplexobject
(
c
);
}
}
...
@@ -513,7 +513,7 @@ complex_getattr(self, name)
...
@@ -513,7 +513,7 @@ complex_getattr(self, name)
complexobject
*
self
;
complexobject
*
self
;
char
*
name
;
char
*
name
;
{
{
complex
cval
;
Py_
complex
cval
;
if
(
strcmp
(
name
,
"real"
)
==
0
)
if
(
strcmp
(
name
,
"real"
)
==
0
)
return
(
object
*
)
newfloatobject
(
self
->
cval
.
real
);
return
(
object
*
)
newfloatobject
(
self
->
cval
.
real
);
else
if
(
strcmp
(
name
,
"imag"
)
==
0
)
else
if
(
strcmp
(
name
,
"imag"
)
==
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment