LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
altenbach

Add a NaN constant to the numeric palette

Status: Completed

Available in LabVIEW 2019 and later.

It is not obvious that a NaN numeric constant can be created by simply typing "NaN" as value. What we see are weird constructs, e.g. "zero divided by zero" or "square root of -1" to generate a NaN on the diagram.

 

I suggest to add a NaN diagram constant to the numeric palette to make it more obvious.

 

 

(This is just a quick draft. Of course it should be matched in color and design to the other constants)

17 Comments
Brian_Powell
Active Participant

<parody>

I propose that we add a "1" constant.

 

Unity is waaay more important than the nothingness that is zero, or all those so-called "prime" numbers.  And don't get me started about how much more important 1 is than, say, NaN.  Without 1, all of mathematics falls apart.

 

If we had a one constant, I could add it to other values when I wanted to increment them.  I could multiply it by other numbers when I wanted them to stay the same.

 

It's such a pain to drop a "0" constant and change it to "1".

</parody>

Smiley Wink

 

As you can tell, I'm still not convinced.  But by all means, keep giving this kudos if you believe in it.  Power to the people who vote on the Idea Exchange!

kam226
Member

There are some good uses for NaN, like the three above (and the fourth "illegal operation" use which is really important).   The only reason against using it, AFAIK, is the oddity of calling it a "constant" and putting it in with the constants.   How can it be a constant when it's "not a number"?

altenbach
Knight of NI

> How can it be a constant

 

because you cannot change it. 😄

Manzolli
Active Participant

Agree with Brian_Powell. "1" and "-1" are used a lot. Thinking about usability, I would like to have both in the palette. The "-inf", "+inf", "NaN", etc. in the help are good enough. Just type when you need it.

André Manzolli

Mechanical Engineer
Certified LabVIEW Developer - CLD
LabVIEW Champion
Curitiba - PR - Brazil
Darren
Proven Zealot
Status changed to: In Development
 
Darren
Proven Zealot
Status changed to: In Beta
 
Darren
Proven Zealot
Status changed to: Completed

Available in LabVIEW 2019 and later.