summaryrefslogtreecommitdiff
path: root/numpy/f2py/crackfortran.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/f2py/crackfortran.py')
-rwxr-xr-xnumpy/f2py/crackfortran.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/numpy/f2py/crackfortran.py b/numpy/f2py/crackfortran.py
index d02b1f077..5d664e399 100755
--- a/numpy/f2py/crackfortran.py
+++ b/numpy/f2py/crackfortran.py
@@ -1977,16 +1977,19 @@ def _selected_int_kind_func(r):
if m<=2**128: return 16
return -1
-def _selected_real_kind_func(p,r=0,radix=0):
+def _selected_real_kind_func(p, r=0, radix=0):
#XXX: This should be processor dependent
- if p<7: return 4
- if p<16: return 8
+ # This is only good for 0 <= p <= 20
+ if p < 7: return 4
+ if p < 16: return 8
if platform.machine().lower().startswith('power'):
- if p<=20:
+ if p <= 20:
return 16
else:
- if p<19:
+ if p < 19:
return 10
+ elif p <= 20:
+ return 16
return -1
def get_parameters(vars, global_params={}):