Floating point relational operator.

Numerical comparison with specified precision.

Download
Download

You are now following this Submission

Cite As

Jan Orwat (2026). Floating point relational operator. (https://ch.mathworks.com/matlabcentral/fileexchange/57457-floating-point-relational-operator), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired by: numcmp.m

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.2.0

.

Download
1.1.0

inf/nan errors solved. Please note that with numcmp infinities are not equal. inf == inf returns 1, while numcmp(inf,inf) returns 0. This is actually closer to reality:)

Download
1.0.0

Note, this function uses only absolute precision.

Download