Commit d82658f8 authored by Gonzalez, Miguel's avatar Gonzalez, Miguel
Browse files

Use long integers for Z parameter to avoid overflows after x1000 multiplication

parent e805566f
......@@ -24,7 +24,7 @@ function salsa_combine_ws, wks_list
; convert float values to integer (after multiplying by 1000) to search unique values
; z_out contains the output values, zcomp the values to compare (integers or strings)
if typename(zpar) eq 'FLOAT' then begin
zpar = fix(zpar*1000)
zpar = long64(zpar*1000)
zcomp = zpar[uniq(zpar, sort(zpar))]
z_out = zpar[uniq(zpar, sort(zpar))] / 1000.
endif else begin
......@@ -70,7 +70,7 @@ function salsa_combine_ws, wks_list
; check Z values and sum together equivalent points
zval = pstruct.z
if typename(zval) eq 'FLOAT' then begin
zval = fix(zval*1000)
zval = long64(zval*1000)
zval = zval[uniq(zval, sort(zval))]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment