Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #4165 > unrolled thread
| Started by | galaxy3xyz@gmail.com |
|---|---|
| First post | 2019-03-11 09:56 -0700 |
| Last post | 2019-03-11 09:57 -0700 |
| Articles | 2 — 1 participant |
Back to article view | Back to comp.graphics.apps.gnuplot
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Taking the modulo of column data galaxy3xyz@gmail.com - 2019-03-11 09:56 -0700
Re: Taking the modulo of column data galaxy3xyz@gmail.com - 2019-03-11 09:57 -0700
| From | galaxy3xyz@gmail.com |
|---|---|
| Date | 2019-03-11 09:56 -0700 |
| Subject | Re: Taking the modulo of column data |
| Message-ID | <a6e269b0-0f12-4d79-b173-e872222f95c6@googlegroups.com> |
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?
[toc] | [next] | [standalone]
| From | galaxy3xyz@gmail.com |
|---|---|
| Date | 2019-03-11 09:57 -0700 |
| Message-ID | <e1ed72fc-aa95-4884-a5c2-4a697bf41b72@googlegroups.com> |
| In reply to | #4165 |
On Monday, March 11, 2019 at 12:56:21 PM UTC-4, galax...@gmail.com wrote: > 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? "if" you use:
[toc] | [prev] | [standalone]
Back to top | Article view | comp.graphics.apps.gnuplot
csiph-web