Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #2396

Integer overflow when using binary and skip

Newsgroups comp.graphics.apps.gnuplot
Date 2014-04-07 03:43 -0700
Message-ID <c3189dec-b590-4f81-826f-8bd8c71adfee@googlegroups.com> (permalink)
Subject Integer overflow when using binary and skip
From a.daitche@gmail.com

Show all headers | View raw


Hi,

i am plotting data from a large binary file using something like
splot "file.bin" binary record=100000 skip=2000*100000*3*4 u 1:2:3 w d

The file contains the positions of 100000 particles at 10000 time-points. The above example should plot the particle positions at the 2000th time-point, but throws the following error message
"Number of bytes to skip must be positive integer"

The reason is that 2000*100000*3*4 is larger then the largest 32bit integer and an overflow would occur. To prevent this gnuplot converts the number to a float, which, unfortunately, is not accepted as an argument for skip.

Ideally i would tell gnuplot to use 64bit integer, however this doesn't seem to be possible. Do you have any ideas for a workaround? 

With best regards
Anton

Back to comp.graphics.apps.gnuplot | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Integer overflow when using binary and skip a.daitche@gmail.com - 2014-04-07 03:43 -0700
  Re: Integer overflow when using binary and skip Karl <mail.kfr@gmx.net> - 2014-04-07 14:44 +0200
  Re: Integer overflow when using binary and skip Axel Berger <Axel.Berger@Gmx.De> - 2014-04-07 17:18 +0200
    Re: Integer overflow when using binary and skip Axel Berger <Axel.Berger@Gmx.De> - 2014-04-07 17:21 +0200
      Re: Integer overflow when using binary and skip a.daitche@gmail.com - 2014-04-09 03:48 -0700
        Re: Integer overflow when using binary and skip a.daitche@gmail.com - 2014-04-09 03:53 -0700
          Re: Integer overflow when using binary and skip Axel Berger <Axel.Berger@Gmx.De> - 2014-04-09 20:27 +0200
  Re: Integer overflow when using binary and skip Ethan A Merritt <merritt@u.washington.edu> - 2014-04-09 16:37 -0700
  Re: Integer overflow when using binary and skip Ethan A Merritt <sfeam@users.sourceforge.net> - 2014-04-14 12:49 -0700

csiph-web