01-07-2013 05:21 AM
Hi all,
I have observed strange behavior in the min & Max node in the snippet below. It is set to compare elements. Depending on the array size as determined by "Dimension" the resulting y array for "Signal" yields different results.
It is supposed to read:
NaN,1,1,1,2,2,2,NaN,...
But when I enter a value for "Dimension" of 16 or greater it reads:
NaN,NaN,NaN,NaN,2,2,2,NaN,...
For smaller values of "Dimension" the snippet works as intended.
Using probes it seems that min(NaN;x)=x for Arrays with 15 elements and less and for larger arrays it's min(NaN;x)=NaN
Surely this is not intended
I guess I'm missing something obvious and am about to learn something.
Or is this really a bug?
Using LV 2011 SP1
Regards
Florian
Solved! Go to Solution.
01-07-2013 05:55 AM
01-07-2013 06:19 AM
Thanks for answering.
I did a quick forum search before posting, and have tried again (with more effort ) after reading your post.
I can't find anything though.
Nothing here
http://www.ni.com/white-paper/13164/%29
either.
Regards Florian
01-07-2013 07:43 AM
Hi Florian,
I too can't find that at the moment. But I remember some strange compiler problems for arrays of certain size (16 elements was the "barrier" I think).
Maybe someone else can remember the corresponding CAR or link...
01-07-2013 08:14 AM
For what it's worth it's doing it in LV2012 also.
Mike...
01-07-2013 08:20 AM
A workaround for your problem is to put a for loop around the compare. It will give consistent results.
What I find interesting is that the result for arrays larger than 16 elements is the same as if you compare aggregates.
This also appearss to be specific to NaN. If you use a different value for your array, you don't see the value change.
I can also confirm the same behavior in LV2012.
01-07-2013 08:22 AM
Thanks,
that's the workaround that I came to implement too.
Regards Florian
01-07-2013 08:44 AM
Just tried it in LV2009 also and it worked as expected.
Mike...
01-07-2013 04:26 PM
This has been reported and has a new CAR #385324.
Mike...