LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

in range and coerce oddity

Hi all!

 

Stumbled on som weird behaviour of the In Range and Coerse primitive. If I run the the attached code (LV2010, no patch) on Linux Ubuntu, the behaviour changes when the array size gets bigger than 15. Below 15, output is array of NaN, above 15, output is array of -inf.

 

Can you reproduce this on your platforms (as mine is not supported)? Has this changed with a patch?

 

Tanks for any help.

 

//Martin



CLA
https://www.prevas.se/expertis/test--regulatoriska-krav.html
Message 1 of 9
(4,258 Views)

Confirmed on Mac OS X 10.5.8, LV 2010 10.f2

 

Lynn

0 Kudos
Message 2 of 9
(4,254 Views)

Confirmed on Win XP, LV 2010f2

 

Actually, what I see is 15 elements and below, all elements remain NaN.  For 16 and above, the zeroth element is coerced to 5, the remaining elements are coerced to -Inf.

0 Kudos
Message 3 of 9
(4,243 Views)

I see something similar. For odd values of dimension size >15 the last element is 5 but the Coerced? output is still false.

 

Lynn

 

In Range Oddity.png

0 Kudos
Message 4 of 9
(4,233 Views)

Very Very Odd.

 

When I first ran the VI, I swear the 5 was in the top position.  I've since opened the VI again (I closed the VI after I finished replying earlier) so I could see about the odd vs. even # of elements, and I'm now seeing what you are seeing Lynn.  So far I haven't been able to replicate what I saw earlier with the 5 in the first position.

 

UPDATE:  LV 2009SP1 (also on WinXP) does not show this behavior.

0 Kudos
Message 5 of 9
(4,226 Views)

Same behaviour on Windows XP.  But why would you want to create an array of NaN and then try to coerce between 5 and neg infinity?

- tbob

Inventor of the WORM Global
0 Kudos
Message 6 of 9
(4,224 Views)

Anything dealing with arrays of size 16 or greater is almost certainly related to the SSE implementation introduced in 2010. I've filed CAR 277565 on this.

 

Jim

Message 7 of 9
(4,199 Views)

Thanks everyone.

 

tbob: A bug in my system caused my measurements to become NaN once in a while. This was only noticed as a blank in my curves in 8.6, but this bug in 2010 made me find my own bug.

 

//Martin



CLA
https://www.prevas.se/expertis/test--regulatoriska-krav.html
0 Kudos
Message 8 of 9
(4,162 Views)

Confirmed on Windows 7 and LabVIEW 2010.

 

Here's a little video showing the bug:

 

Unable to display content. Adobe Flash is required. Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 9 of 9
(4,122 Views)