Popular Post candidus Posted April 12, 2013 Popular Post Report Share Posted April 12, 2013 Everybody knows the problem: We need custom VIs to compare floating point values using a tolerance. I just discovered something via scripting: The Floating Point Equal? primitive which does exactly that. Can anyone imagine why it is missing from the standard palette? It's in LV since version 8.0 ... FloatingPointEqual_LV80.vi 8 Quote Link to comment
ShaunR Posted April 12, 2013 Report Share Posted April 12, 2013 Nice find It would be nice if the tolerance had a default value so for most use cases we didn't have to specify it. Quote Link to comment
Dan DeFriese Posted April 12, 2013 Report Share Posted April 12, 2013 Can anyone imagine why it is missing from the standard palette?It's in LV since version 8.0 ... My imagination is limited so I selected the context help - it sends you to '(Incomplete) Beta Function'. So I'd guess that either it dropped off someone's radar at NI or there was a problem with the implementation and someone forgot to remove it (and dropped off the radar ever since!). Quote Link to comment
Jordan Kuehn Posted April 12, 2013 Report Share Posted April 12, 2013 Nice find It would be nice if the tolerance had a default value so for most use cases we didn't have to specify it. Especially if the default tolerance would automatically adjust according to the type of floating fixed point number wired into it. (misread and thought the title said fixed point. would still be cool if it could automatically adapt to fixed point inpuits). Quote Link to comment
Darin Posted April 12, 2013 Report Share Posted April 12, 2013 Makes it even easier to implement my idea: http://forums.ni.com/t5/LabVIEW-Idea-Exchange/quot-Almost-Equal-quot-functions-for-Float-comparisons/idi-p/1446480 Quote Link to comment
candidus Posted April 16, 2013 Author Report Share Posted April 16, 2013 Makes it even easier to implement my idea: http://forums.ni.com/t5/LabVIEW-Idea-Exchange/quot-Almost-Equal-quot-functions-for-Float-comparisons/idi-p/1446480 That's odd. There's an existing well kudoed idea and an existing primitive but nothing happens... NI, where are you? Quote Link to comment
mje Posted April 16, 2013 Report Share Posted April 16, 2013 There are multiple "correct" ways to check for near equality and perhaps the implementation as it stands is not what NI wanted to endorse as the way of doing things. As in many things, often the best implementation depends on context. Just my guess. I think it's neat the primitive exists, but don't see it as a major loss that the functionality isn't on the native palette. Quote Link to comment
Popular Post Mr Mike Posted April 16, 2013 Popular Post Report Share Posted April 16, 2013 An unofficial response: avoid this primitive. It was requested by a group within NI and it turned out they didn't need it halfway through its development. In a lot of cases it can create a compile error. In some cases it will cause a crash on save. The author says that it was never thoroughly tested (so don't expect IEEE 754 conformance!) and that bug reports for it are rejected since it was never officially released (not even for internal use). This is a prime example of digging around in LabVIEW and finding fool's gold instead of actual gold. 5 Quote Link to comment
candidus Posted April 17, 2013 Author Report Share Posted April 17, 2013 This is a prime example of digging around in LabVIEW and finding fool's gold instead of actual gold. Well, that's why I asked about it. Thank you! Nevertheless I think there should be done something about it: Either implement the primitive properly or remove it entirely. Since it was never released this should break nobody's code. Quote Link to comment
hooovahh Posted April 17, 2013 Report Share Posted April 17, 2013 This is a prime example of digging around in LabVIEW and finding fool's gold instead of actual gold. Dang, but my sincerest thank you for addressing this. Quote Link to comment
Mr Mike Posted April 18, 2013 Report Share Posted April 18, 2013 Dang, but my sincerest thank you for addressing this. No problem. If it makes you feel better, I kudo'd the original idea. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.