Skip to content

Commit 5cf5e3e

Browse files
committed
Don't use M_PI from libc.math
It's not part of the C standard, and not provided on Windows. Fix for src/sage/plot/plot3d/shapes.cp311-win_amd64.pyd.p/src/sage/plot/plot3d/shapes.pyx.c:12624:35: error: 'M_PI' undeclared (first use in this function) 12624 | __pyx_t_3 = PyLong_FromDouble(((M_PI * __pyx_v_self->radius) / __pyx_v_ds)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 959, __pyx_L1_error)
1 parent c71bd71 commit 5cf5e3e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/sage/plot/plot3d/shapes.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ EXAMPLES::
5151
# https://www.gnu.org/licenses/
5252
# ****************************************************************************
5353

54-
from libc.math cimport sqrt, sin, cos, acos, M_PI
54+
from libc.math cimport sqrt, sin, cos, acos
5555
from sage.rings.real_double import RDF
5656
from sage.modules.free_module_element import vector
5757
from sage.misc.decorators import rename_keyword
5858
from sage.plot.plot3d.base import Graphics3dGroup
5959
from sage.plot.plot3d.index_face_set cimport IndexFaceSet, PrimitiveObject
6060
from sage.plot.plot3d.transform cimport point_c
61-
61+
from sage.arith.constants cimport M_PI
6262

6363
# Helper function to check that Box input is right
6464
def validate_frame_size(size):

src/sage/stats/hmm/chmm.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ AUTHOR:
1818
# ***************************************************************************
1919

2020
from cpython.object cimport PyObject_RichCompare
21-
from libc.math cimport log, sqrt, exp, isnormal, isfinite, M_PI
21+
from libc.math cimport log, sqrt, exp, isnormal, isfinite
22+
from sage.arith.constants cimport M_PI
2223
cdef double sqrt2pi = sqrt(2*M_PI)
2324
from cysignals.signals cimport sig_on, sig_off
2425

0 commit comments

Comments
 (0)