Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
f4d5dec3
Commit
f4d5dec3
authored
May 08, 2020
by
Dean Scarff
Committed by
scoder
May 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for libc.math's modf
Test modf, since it's in C89 and has a non-trivial signature.
parent
b45c8e9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
tests/run/libc_math.pyx
tests/run/libc_math.pyx
+12
-2
No files found.
tests/run/libc_math.pyx
View file @
f4d5dec3
...
...
@@ -2,8 +2,8 @@
from
libc.math
cimport
(
M_E
,
M_LOG2E
,
M_LOG10E
,
M_LN2
,
M_LN10
,
M_PI
,
M_PI_2
,
M_PI_4
,
M_1_PI
,
M_2_PI
,
M_2_SQRTPI
,
M_SQRT2
,
M_SQRT1_2
)
from
libc.math
cimport
(
acos
,
asin
,
atan
,
atan2
,
cos
,
sin
,
sinf
,
sinl
,
tan
,
cosh
,
sinh
,
tanh
,
acosh
,
asinh
,
atanh
,
exp
,
log
,
log10
,
pow
,
sqrt
)
from
libc.math
cimport
(
acos
,
asin
,
atan
,
atan2
,
cos
,
modf
,
sin
,
sinf
,
sinl
,
tan
,
cosh
,
sinh
,
tanh
,
acosh
,
asinh
,
atanh
,
exp
,
log
,
log10
,
pow
,
sqrt
)
cimport
libc.math
as
libc_math
...
...
@@ -42,3 +42,13 @@ def test_sin_kwarg(x):
0.0
"""
return
sin
(
x
=
x
)
def
test_modf
(
x
):
"""
>>> test_modf(2.5)
(0.5, 2.0)
"""
cdef
double
i
cdef
double
f
=
modf
(
x
,
&
i
)
return
(
f
,
i
)
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