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
Gwenaël Samain
cython
Commits
e61da2eb
Commit
e61da2eb
authored
Sep 07, 2015
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Further future division tests.
parent
3d420e67
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
tests/run/future_division.pyx
tests/run/future_division.pyx
+7
-0
tests/run/non_future_division.pyx
tests/run/non_future_division.pyx
+7
-0
No files found.
tests/run/future_division.pyx
View file @
e61da2eb
...
@@ -150,3 +150,10 @@ def infer_division_type():
...
@@ -150,3 +150,10 @@ def infer_division_type():
v
=
(
10000
**
2
-
1
)
/
12
v
=
(
10000
**
2
-
1
)
/
12
print
(
cython
.
typeof
(
v
))
print
(
cython
.
typeof
(
v
))
return
v
return
v
def
int_int
(
int
a
,
int
b
):
"""
>>> int_int(1, 2)
(0.5, 2.0)
"""
return
a
/
b
,
b
/
a
tests/run/non_future_division.pyx
View file @
e61da2eb
...
@@ -136,3 +136,10 @@ def float_mix_rev(float a):
...
@@ -136,3 +136,10 @@ def float_mix_rev(float a):
(0.25, 0.0, 1.25, 1.0, 1.25, 1.0)
(0.25, 0.0, 1.25, 1.0, 1.25, 1.0)
"""
"""
return
1
/
a
,
1
//
a
,
5.0
/
a
,
5.0
//
a
,
5
/
a
,
5
//
a
return
1
/
a
,
1
//
a
,
5.0
/
a
,
5.0
//
a
,
5
/
a
,
5
//
a
def
int_int
(
int
a
,
int
b
):
"""
>>> int_int(1, 2)
(0, 2)
"""
return
a
/
b
,
b
/
a
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