X-Received: by 2002:a24:5c81:: with SMTP id q123mr9488itb.34.1552323380064; Mon, 11 Mar 2019 09:56:20 -0700 (PDT) X-Received: by 2002:a9d:6748:: with SMTP id w8mr22183535otm.252.1552323379795; Mon, 11 Mar 2019 09:56:19 -0700 (PDT) Path: csiph.com!4.us.feeder.erje.net!feeder.erje.net!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!y22no17530ita.0!news-out.google.com!d79ni30itc.0!nntp.google.com!y22no17528ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.graphics.apps.gnuplot Date: Mon, 11 Mar 2019 09:56:19 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2600:1700:caf0:7080:cc5e:7f85:9ae6:1a21; posting-account=eyyzsAoAAAASi1zeqj5JlSdSkG2kEXJt NNTP-Posting-Host: 2600:1700:caf0:7080:cc5e:7f85:9ae6:1a21 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Taking the modulo of column data From: galaxy3xyz@gmail.com Injection-Date: Mon, 11 Mar 2019 16:56:20 +0000 Content-Type: text/plain; charset="UTF-8" Lines: 31 Xref: csiph.com comp.graphics.apps.gnuplot:4165 On Tuesday, November 12, 2002 at 12:55:38 PM UTC-5, Gert wrote: > > I don't think so. You did overlook the actual gnuplot documentation, > > though. To be more precise: "help expression", which says: > > > > Note that gnuplot uses both "real" and "integer" arithmetic, like FORTRAN and > > C. Integers are entered as "1", "-10", etc; reals as "1.0", "-10.0", "1e1", > > 3.5e-1, etc. The most important difference between the two forms is in > > division: division of integers truncates: 5/2 = 2; division of reals does > > not: 5.0/2.0 = 2.5. In mixed expressions, integers are "promoted" to reals > > before evaluation: 5/2e0 = 2.5. The result of division of a negative integer > > by a positive one may vary among compilers. Try a test like "print -5/2" to > > determine if your system chooses -2 or -3 as the answer. > > > > This explains why the problem occurs in the first place. > > Well, actually, I did read this part of the documentation. So I understood > the nature of the problem. But the documentation didn't mention anything > about the possibility to perform casting. > > Thanks anyway for pointing me out. > > Greetings, > > Gert This does not work in you use: set datafile separator "," for comma separated data (CSV) This must be a bug right?