Compares two CFNumber objects and returns a comparison result.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
The first CFNumber object to compare.
The second CFNumber object to compare.
CFComparison constant that indicates whether
number is equal to, less than, or greater than
When comparing two CFNumber objects using this function, one or both objects can represent a special-case number such as signed 0, signed infinity, or NaN.
The following rules apply:
Negative 0 compares less than positive 0.
Positive infinity compares greater than everything except itself, to which it compares equal.
Negative infinity compares less than everything except itself, to which it compares equal.
If both numbers are NaN, then they compare equal.
If only one of the numbers is NaN, then the NaN compares greater than the other number if it is negative, and smaller than the other number if it is positive.