Re: [Pdl-devel] Fwd: Re: [Pdl-general] Weird behaviour of stats with bad values

2015-07-25 Thread Zakariyya Mughal
I had a discussion with Chris last weekend on IRC and we decided that the way forward was to: First, create a warning for when a comparison op has *_badval ∈ {0, 1}, then merge that into master & do a full release. Then, once that is out, we can change the output type for comparisons to `byte` (t

Re: [Pdl-devel] Fwd: Re: [Pdl-general] Weird behaviour of stats with bad values

2015-07-07 Thread Zakariyya Mughal
age- From: Zakariyya Mughal > Sent: Saturday, July 04, 2015 8:40 AM > To: pdl-devel > Cc: MarekGierliński ; Chris Marshall ; Ed > Subject: Re: [Pdl-devel] Fwd: Re: [Pdl-general] Weird behaviour of > stats with bad values > > Hi all, > > I have done further investig

Re: [Pdl-devel] Fwd: Re: [Pdl-general] Weird behaviour of stats with bad values

2015-07-05 Thread Ed
r, we should be fine; and this clarification seems highly reasonable. Does anybody disagree? -Original Message- From: Zakariyya Mughal Sent: Saturday, July 04, 2015 8:40 AM To: pdl-devel Cc: MarekGierliński ; Chris Marshall ; Ed Subject: Re: [Pdl-devel] Fwd: Re: [Pdl-general] Weird behaviou

Re: [Pdl-devel] Fwd: Re: [Pdl-general] Weird behaviour of stats with bad values

2015-07-04 Thread Zakariyya Mughal
Hi all, I have done further investigation into SF#390 on the sf390 branch . I rewrote the BadCode PP code in `ops.pd` specifically for comparison operators (==, >, <, etc.) since, with the previous code, the semantics for what to do when only one of the

Re: [Pdl-devel] Fwd: Re: [Pdl-general] Weird behaviour of stats with bad values

2015-06-21 Thread Zakariyya Mughal
: Tuesday, June 16, 2015 5:12 PM > To: Chris Marshall ; pdl-devel@lists.sourceforge.net > Subject: Re: [Pdl-devel] Fwd: Re: [Pdl-general] Weird behaviour of stats with > bad values > > Thanks a lot, Chris! > > Marek > > > On Tue, 16 Jun 2015 at 15:57 Chris Marsh

Re: [Pdl-devel] Fwd: Re: [Pdl-general] Weird behaviour of stats with bad values

2015-06-17 Thread Ed
: [Pdl-general] Weird behaviour of stats with bad values Thanks a lot, Chris! Marek On Tue, 16 Jun 2015 at 15:57 Chris Marshall wrote: Marek- I've opened a highest priority bug report based on your information: http://sourceforge.net/p/pdl/bugs/390 Could you add information on

Re: [Pdl-devel] Fwd: Re: [Pdl-general] Weird behaviour of stats with bad values

2015-06-16 Thread Marek Gierliński
Thanks a lot, Chris! Marek On Tue, 16 Jun 2015 at 15:57 Chris Marshall wrote: > Marek- > > I've opened a highest priority bug report based on your information: > > http://sourceforge.net/p/pdl/bugs/390 > > Could you add information on your system specifics to the ticket > for reference (the

Re: [Pdl-devel] Fwd: Re: [Pdl-general] Weird behaviour of stats with bad values

2015-06-16 Thread Chris Marshall
Marek- I've opened a highest priority bug report based on your information: http://sourceforge.net/p/pdl/bugs/390 Could you add information on your system specifics to the ticket for reference (the output of perldl -V has the main information)? We'll be updating the ticket as information beco

Re: [Pdl-devel] Fwd: Re: [Pdl-general] Weird behaviour of stats with bad values

2015-06-16 Thread Marek Gierliński
This is very bad news for me. I just searched through my scripts and found 586 instances of 'stats'. If this is not corrected, I have to assume that all of them might potentially produce incorrect results, without even failing (like in the if($s > 0) example). We've been using 2.007 for a couple o

Re: [Pdl-devel] Fwd: Re: [Pdl-general] Weird behaviour of stats with bad values

2015-06-16 Thread Marek Gierliński
OK, thank you for your explanations. I'm not sure if all of this makes sense. If you try print $s > 5; in the above example, you will get 'BAD'. 5 is just a scalar and not a bad value. And $s is a one-dimensional piddle with a value different from the bad value. Neither of the values in this cond

Re: [Pdl-devel] Fwd: Re: [Pdl-general] Weird behaviour of stats with bad values

2015-06-16 Thread Chris Marshall
That definitely seems like a bug to me. Thanks for the cross-check, Marek. Devels, I see the same in the latest PDL release so it is not a PDL-2.007 only issue. --Chris On 6/16/2015 09:36, Marek Gierliński wrote: OK, thank you for your explanations. I'm not sure if all of this makes sense. I

[Pdl-devel] Fwd: Re: [Pdl-general] Weird behaviour of stats with bad values

2015-06-16 Thread Chris Marshall
This result seems to violate the principle of least surprise. On the LHS we have a PDL with badvalue(0) and on the RHS we have a perl scalar with value 0 (which happens to be the bad value for the PDL). It seems surprising that $pdl > 0 is actually $pdl > pdl(0)->badvalue(0) Thoughts? Chris --