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
387c547f
Kaydet (Commit)
387c547f
authored
Eyl 06, 2001
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Revert parts of patch #453627, documenting the resulting test failures
instead.
üst
c2d272a1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
56 deletions
+9
-56
cmathmodule.c
Modules/cmathmodule.c
+2
-18
mathmodule.c
Modules/mathmodule.c
+1
-17
complexobject.c
Objects/complexobject.c
+1
-17
README
README
+5
-0
acconfig.h
acconfig.h
+0
-2
pyconfig.h.in
pyconfig.h.in
+0
-2
No files found.
Modules/cmathmodule.c
Dosyayı görüntüle @
387c547f
...
@@ -8,22 +8,6 @@
...
@@ -8,22 +8,6 @@
#define M_PI (3.141592653589793239)
#define M_PI (3.141592653589793239)
#endif
#endif
#ifdef SCO_ATAN2_BUG
/*
* UnixWare 7+ is known to have a bug in atan2 that will return PI instead
* of ZERO (0) if the first argument is ZERO(0).
*/
static
double
atan2_sco
(
double
x
,
double
y
)
{
if
(
x
==
0
.
0
)
return
(
double
)
0
.
0
;
return
atan2
(
x
,
y
);
}
#define ATAN2 atan2_sco
#else
#define ATAN2 atan2
#endif
/* First, the C functions that do the real work */
/* First, the C functions that do the real work */
/* constants */
/* constants */
...
@@ -175,7 +159,7 @@ c_log(Py_complex x)
...
@@ -175,7 +159,7 @@ c_log(Py_complex x)
{
{
Py_complex
r
;
Py_complex
r
;
double
l
=
hypot
(
x
.
real
,
x
.
imag
);
double
l
=
hypot
(
x
.
real
,
x
.
imag
);
r
.
imag
=
ATAN
2
(
x
.
imag
,
x
.
real
);
r
.
imag
=
atan
2
(
x
.
imag
,
x
.
real
);
r
.
real
=
log
(
l
);
r
.
real
=
log
(
l
);
return
r
;
return
r
;
}
}
...
@@ -191,7 +175,7 @@ c_log10(Py_complex x)
...
@@ -191,7 +175,7 @@ c_log10(Py_complex x)
{
{
Py_complex
r
;
Py_complex
r
;
double
l
=
hypot
(
x
.
real
,
x
.
imag
);
double
l
=
hypot
(
x
.
real
,
x
.
imag
);
r
.
imag
=
ATAN
2
(
x
.
imag
,
x
.
real
)
/
log
(
10
.);
r
.
imag
=
atan
2
(
x
.
imag
,
x
.
real
)
/
log
(
10
.);
r
.
real
=
log10
(
l
);
r
.
real
=
log10
(
l
);
return
r
;
return
r
;
}
}
...
...
Modules/mathmodule.c
Dosyayı görüntüle @
387c547f
...
@@ -12,22 +12,6 @@ extern double modf (double, double *);
...
@@ -12,22 +12,6 @@ extern double modf (double, double *);
#endif
/* __STDC__ */
#endif
/* __STDC__ */
#endif
/* _MSC_VER */
#endif
/* _MSC_VER */
#ifdef SCO_ATAN2_BUG
/*
* UnixWare 7+ is known to have a bug in atan2 that will return PI instead
* of ZERO (0) if the first argument is ZERO(0).
*/
static
double
atan2_sco
(
double
x
,
double
y
)
{
if
(
x
==
0
.
0
)
return
(
double
)
0
.
0
;
return
atan2
(
x
,
y
);
}
#define ATAN2 atan2_sco
#else
#define ATAN2 atan2
#endif
/* Call is_error when errno != 0, and where x is the result libm
/* Call is_error when errno != 0, and where x is the result libm
* returned. is_error will usually set up an exception and return
* returned. is_error will usually set up an exception and return
* true (1), but may return false (0) without setting up an exception.
* true (1), but may return false (0) without setting up an exception.
...
@@ -115,7 +99,7 @@ FUNC1(asin, asin,
...
@@ -115,7 +99,7 @@ FUNC1(asin, asin,
"asin(x)
\n\n
Return the arc sine (measured in radians) of x."
)
"asin(x)
\n\n
Return the arc sine (measured in radians) of x."
)
FUNC1
(
atan
,
atan
,
FUNC1
(
atan
,
atan
,
"atan(x)
\n\n
Return the arc tangent (measured in radians) of x."
)
"atan(x)
\n\n
Return the arc tangent (measured in radians) of x."
)
FUNC2
(
atan2
,
ATAN
2
,
FUNC2
(
atan2
,
atan
2
,
"atan2(y, x)
\n\n
Return the arc tangent (measured in radians) of y/x.
\n
"
"atan2(y, x)
\n\n
Return the arc tangent (measured in radians) of y/x.
\n
"
"Unlike atan(y/x), the signs of both x and y are considered."
)
"Unlike atan(y/x), the signs of both x and y are considered."
)
FUNC1
(
ceil
,
ceil
,
FUNC1
(
ceil
,
ceil
,
...
...
Objects/complexobject.c
Dosyayı görüntüle @
387c547f
...
@@ -26,22 +26,6 @@
...
@@ -26,22 +26,6 @@
#define PREC_REPR 17
#define PREC_REPR 17
#define PREC_STR 12
#define PREC_STR 12
#ifdef SCO_ATAN2_BUG
/*
* UnixWare 7+ is known to have a bug in atan2 that will return PI instead
* of ZERO (0) if the first argument is ZERO(0).
*/
static
double
atan2_sco
(
double
x
,
double
y
)
{
if
(
x
==
0
.
0
)
return
(
double
)
0
.
0
;
return
atan2
(
x
,
y
);
}
#define ATAN2 atan2_sco
#else
#define ATAN2 atan2
#endif
/* elementary operations on complex numbers */
/* elementary operations on complex numbers */
static
Py_complex
c_1
=
{
1
.,
0
.};
static
Py_complex
c_1
=
{
1
.,
0
.};
...
@@ -154,7 +138,7 @@ c_pow(Py_complex a, Py_complex b)
...
@@ -154,7 +138,7 @@ c_pow(Py_complex a, Py_complex b)
else
{
else
{
vabs
=
hypot
(
a
.
real
,
a
.
imag
);
vabs
=
hypot
(
a
.
real
,
a
.
imag
);
len
=
pow
(
vabs
,
b
.
real
);
len
=
pow
(
vabs
,
b
.
real
);
at
=
ATAN
2
(
a
.
imag
,
a
.
real
);
at
=
atan
2
(
a
.
imag
,
a
.
real
);
phase
=
at
*
b
.
real
;
phase
=
at
*
b
.
real
;
if
(
b
.
imag
!=
0
.
0
)
{
if
(
b
.
imag
!=
0
.
0
)
{
len
/=
exp
(
at
*
b
.
imag
);
len
/=
exp
(
at
*
b
.
imag
);
...
...
README
Dosyayı görüntüle @
387c547f
...
@@ -296,6 +296,11 @@ SCO: The following apply to SCO 3 only; Python builds out of the box
...
@@ -296,6 +296,11 @@ SCO: The following apply to SCO 3 only; Python builds out of the box
LIBS=' -lsocket -lcrypt_i'
LIBS=' -lsocket -lcrypt_i'
UnixWare: There are known bugs in the math library of the system, as well as
problems in the handling of threads (calling fork in one
thread may interrupt system calls in others). Therefore, test_math and
tests involving threads will fail until those problems are fixed.
SunOS 4.x: When using the SunPro C compiler, you may want to use the
SunOS 4.x: When using the SunPro C compiler, you may want to use the
'-Xa' option instead of '-Xc', to enable some needed non-ANSI
'-Xa' option instead of '-Xc', to enable some needed non-ANSI
Sunisms.
Sunisms.
...
...
acconfig.h
Dosyayı görüntüle @
387c547f
...
@@ -245,8 +245,6 @@
...
@@ -245,8 +245,6 @@
/* Define the macros needed if on a UnixWare 7.x system. */
/* Define the macros needed if on a UnixWare 7.x system. */
#if defined(__USLC__) && defined(__SCO_VERSION__)
#if defined(__USLC__) && defined(__SCO_VERSION__)
#define SCO_ACCEPT_BUG
/* Use workaround for UnixWare accept() bug */
#define SCO_ATAN2_BUG
/* Use workaround for UnixWare atan2() bug */
#define STRICT_SYSV_CURSES
/* Don't use ncurses extensions */
#define STRICT_SYSV_CURSES
/* Don't use ncurses extensions */
#endif
#endif
pyconfig.h.in
Dosyayı görüntüle @
387c547f
...
@@ -725,8 +725,6 @@
...
@@ -725,8 +725,6 @@
/* Define the macros needed if on a UnixWare 7.x system. */
/* Define the macros needed if on a UnixWare 7.x system. */
#if defined(__USLC__) && defined(__SCO_VERSION__)
#if defined(__USLC__) && defined(__SCO_VERSION__)
#define SCO_ACCEPT_BUG /* Use workaround for UnixWare accept() bug */
#define SCO_ATAN2_BUG /* Use workaround for UnixWare atan2() bug */
#define STRICT_SYSV_CURSES /* Don't use ncurses extensions */
#define STRICT_SYSV_CURSES /* Don't use ncurses extensions */
#endif
#endif
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