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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
679b58a6
Commit
679b58a6
authored
May 26, 2010
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More large literal as double fixes.
parent
fb7cf01b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+3
-2
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+1
-1
tests/run/literals.pyx
tests/run/literals.pyx
+4
-2
No files found.
Cython/Compiler/ExprNodes.py
View file @
679b58a6
...
...
@@ -4993,8 +4993,9 @@ class NumBinopNode(BinopNode):
return
if
self
.
type
.
is_complex
:
self
.
infix
=
False
self
.
operand1
=
self
.
operand1
.
coerce_to
(
self
.
type
,
env
)
self
.
operand2
=
self
.
operand2
.
coerce_to
(
self
.
type
,
env
)
if
not
self
.
infix
or
(
type1
.
is_numeric
and
type2
.
is_numeric
):
self
.
operand1
=
self
.
operand1
.
coerce_to
(
self
.
type
,
env
)
self
.
operand2
=
self
.
operand2
.
coerce_to
(
self
.
type
,
env
)
def
compute_c_result_type
(
self
,
type1
,
type2
):
if
self
.
c_types_okay
(
type1
,
type2
):
...
...
Cython/Compiler/Nodes.py
View file @
679b58a6
...
...
@@ -3345,7 +3345,7 @@ class InPlaceAssignmentNode(AssignmentNode):
import
ExprNodes
if
self
.
lhs
.
type
.
is_pyobject
:
self
.
rhs
=
self
.
rhs
.
coerce_to_pyobject
(
env
)
elif
self
.
rhs
.
type
.
is_pyobject
:
elif
self
.
rhs
.
type
.
is_pyobject
or
(
self
.
lhs
.
type
.
is_numeric
and
self
.
rhs
.
type
.
is_numeric
)
:
self
.
rhs
=
self
.
rhs
.
coerce_to
(
self
.
lhs
.
type
,
env
)
if
self
.
lhs
.
type
.
is_pyobject
:
self
.
result_value_temp
=
ExprNodes
.
PyTempNode
(
self
.
pos
,
env
)
...
...
tests/run/literals.pyx
View file @
679b58a6
...
...
@@ -66,6 +66,8 @@ def test_complex(x):
def test_large_int(double x):
"""
>>>
test_large_int
(
0
)
1
e+100
2
e+100
"""
return x + 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
a = x + 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
a += 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
return 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