Jump to content

[CR] Floating Point Almost Equal

Recommended Posts

Floating Point Almost Equal

This package contains VIs for testing equality of floating point numbers within a specified tolerance. Absolute Epsilon comparison, Relative Epsilon comparison and the ULP comparison have been implemented as described in this blog post by Bruce Dawson: http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
Note that the ULP comparison has not been implemented for extended precision floating point type.
Installation and instructions:
  • Install VIP package using VI Package Manager 2014.
  • "<LabVIEW>\examples\LAVA\AlmostEqual\AlmostEqual_Example 1.vi" Demonstrates the usage of all three AlmostEqual functions.
  • "<LabVIEW>\examples\LAVA\AlmostEqual\AlmostEqual_Example 2.vi" Demonstrates a case where exactly equal fails to produce the expected result.
Development version available on GitHubhttps://github.com/rfporter/FP-Equal

  • Submitter
  • Submitted
  • Category
  • LabVIEW Version


  • Like 1

Share this post

Link to post
Share on other sites

I responded to the other thread regarding using pale-yellow for the background color, but for reference I add a comment here as well.



Share this post

Link to post
Share on other sites

Just posted about this package at the Unit Testing Group at NI: https://decibel.ni.com/content/thread/26693


I have done similar comparison math in the past, but your package is a lot more complete. Thanks for the post to Bruce Dawson's article.




Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.