XFloat Documentation - 7. Comparison Operations

Written by Integralus

7. Comparison Operations

  • .cmp(xf)

    • xf: (XFloat object) the value to compare with

    Return 1 if current object is greater than xf, return 0 if equal, and return -1 if less.

  • .cmp(number[, exponent])

    • number: (24-bit integer) the mantissa of value to compare with
    • exponent: (24-bit integer) the exponent of value to compare with, if it is omitted, it is considered as 0.

    Return 1 if current object is greater than number * Bexponent, return 0 if equal, and return -1 if less.

Comparison Operations Example


Other languages