llvm::ScaledNumbers

Helpers for arithmetic on pairs of digits and a binary scale.

Functions

NameDescription
compare Compare two scaled numbers.
compareImpl Implementation for comparing scaled numbers.
divide32 Divide two 32-bit integers to create a 32-bit scaled number.
divide64 Divide two 64-bit integers to create a 64-bit scaled number.
getAdjusted Adjust a 64-bit scaled number down to the appropriate width.
getAdjusted32 Convenience helper for adjusting to 32 bits.
getAdjusted64 Convenience helper for adjusting to 64 bits.
getDifference Get the difference of two scaled numbers.
getDifference32 Convenience helper for 32-bit difference.
getDifference64 Convenience helper for 64-bit difference.
getLg Get the lg (rounded) of a scaled number.
getLgCeiling Get the lg ceiling of a scaled number.
getLgFloor Get the lg floor of a scaled number.
getLgImpl Implementation of getLg() and friends.
getProduct Multiply two 32-bit integers to create a 32-bit scaled number.
getProduct32 Convenience helper for 32-bit product.
getProduct64 Convenience helper for 64-bit product.
getQuotient Divide two 32-bit numbers to create a 32-bit scaled number.
getQuotient32 Convenience helper for 32-bit quotient.
getQuotient64 Convenience helper for 64-bit quotient.
getRounded Conditionally round up a scaled number.
getRounded32 Convenience helper for 32-bit rounding.
getRounded64 Convenience helper for 64-bit rounding.
getSum Get the sum of two scaled numbers.
getSum32 Convenience helper for 32-bit sum.
getSum64 Convenience helper for 64-bit sum.
getWidth Get the width of a number.
matchScales Match scales of two numbers.
multiply64 Multiply two 64-bit integers to create a 64-bit scaled number.

Variables

NameDescription
MaxScale Maximum scale; same as APFloat for easy debug printing.
MinScale Maximum scale; same as APFloat for easy debug printing.