llvm::ScaledNumbers::compare

Compare two scaled numbers.

Synopsis

Declared in <llvm/Support/ScaledNumber.h>

template<class DigitsT>
int
compare(
    DigitsT LDigits,
    int16_t LScale,
    DigitsT RDigits,
    int16_t RScale);

Description

Compare two scaled numbers. Returns 0 for equal, -1 for less than, and 1 for greater than.

Return Value

-1 if less, 0 if equal, and 1 if greater.

Parameters

NameDescription
LDigitsDigits of the left-hand scaled number.
LScaleScale of the left-hand scaled number.
RDigitsDigits of the right-hand scaled number.
RScaleScale of the right-hand scaled number.