projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d97b570
)
fixes for special float value constants (provided by Christian Heimes)
author
Stefan Behnel
<scoder@users.berlios.de>
Fri, 25 Apr 2008 16:20:05 +0000
(18:20 +0200)
committer
Stefan Behnel
<scoder@users.berlios.de>
Fri, 25 Apr 2008 16:20:05 +0000
(18:20 +0200)
Cython/Compiler/ExprNodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ExprNodes.py
b/Cython/Compiler/ExprNodes.py
index c2f5a475ef905b67718b5eec63accc56377c746b..8fb247230464844dd3c513b3af9bb03643e39528 100644
(file)
--- a/
Cython/Compiler/ExprNodes.py
+++ b/
Cython/Compiler/ExprNodes.py
@@
-704,11
+704,11
@@
class FloatNode(ConstNode):
def calculate_result_code(self):
strval = str(self.value)
if strval == 'nan':
- return "
NAN
"
+ return "
(Py_HUGE_VAL * 0)
"
elif strval == 'inf':
- return "
INFINITY
"
+ return "
Py_HUGE_VAL
"
elif strval == '-inf':
- return "(-
INFINITY
)"
+ return "(-
Py_HUGE_VAL
)"
else:
return strval