std::decimal(3)
โจ std::decimal โจ
ok so bestie, welcome to std::decimal from the Library Functions Manual ๐
this is the page for ISO/IEC TR 24733 Decimal floating-point arithmetic and honestly? it's giving "niche but iconic" ๐
๐ธ NAME ๐ธ
std::decimal โ literally the whole vibe of ISO/IEC TR 24733 Decimal floating-point arithmetic ๐
๐ฆ SYNOPSIS ๐ฆ
๐ Classes
class decimal128โ 3.2.4 Class decimal128. โจclass decimal32โ 3.2.2 Class decimal32. ๐class decimal64โ 3.2.3 Class decimal64. ๐
no cap, that's the whole lineup: three decimal classes, all cute, all numbered, all waiting for you to read the next part ๐ซถ
๐งฎ FUNCTIONS ๐งฎ
Okay bestie, sit down, hydrate, because this is the part where the manpage just dumps every single overloaded function on you at once. ๐ It's giving "meet my 300 cousins, all at the same family reunion, and yes you have to hug every one of them." But it's fine!! They're literally all variations on the same three types โ decimal32, decimal64, decimal128 โ plus the plain old C++ integer types. Once you clock the pattern, you'll be reading this like a group chat you're 400 messages behind on. ๐ซถ
the converters ๐
These ones take a decimal and hand you back a normal-ish number. Their whole personality is "translate for me please." โจ
double decimal128_to_double (decimal128 __d)
float decimal128_to_float (decimal128 __d)
long double decimal128_to_long_double (decimal128 __d)
long long decimal128_to_long_long (decimal128 __d)
double decimal32_to_double (decimal32 __d)
float decimal32_to_float (decimal32 __d)
long double decimal32_to_long_double (decimal32 __d)
long long decimal32_to_long_long (decimal32 __d)
double decimal64_to_double (decimal64 __d)
float decimal64_to_float (decimal64 __d)
long double decimal64_to_long_double (decimal64 __d)
long long decimal64_to_long_long (decimal64 __d)
Heads up bestie: decimal32_to_long_long is a Non-conforming extension: Conversion to integral type. So it's the one cousin who showed up uninvited to the standard. ๐ซฃ
And then the โจgeneric-nameโจ versions, which take any of the three decimal flavors and spit out one specific type โ same energy, different wig:
double decimal_to_double (decimal128 __d)
double decimal_to_double (decimal32 __d)
double decimal_to_double (decimal64 __d)
float decimal_to_float (decimal128 __d)
float decimal_to_float (decimal32 __d)
float decimal_to_float (decimal64 __d)
long double decimal_to_long_double (decimal128 __d)
long double decimal_to_long_double (decimal32 __d)
long double decimal_to_long_double (decimal64 __d)
long long decimal_to_long_long (decimal128 __d)
long long decimal_to_long_long (decimal32 __d)
long long decimal_to_long_long (decimal64 __d)
the makers ๐๏ธ
Need to build a decimal out of a coefficient and an exponent? Say less. You get a static factory for each type, and each one comes in a long long flavor and an unsigned long long flavor, because options are self-care. ๐
static decimal128 make_decimal128 (long long __coeff, int __exp)
static decimal128 make_decimal128 (unsigned long long __coeff, int __exp)
static decimal32 make_decimal32 (long long __coeff, int __exp)
static decimal32 make_decimal32 (unsigned long long __coeff, int __exp)
static decimal64 make_decimal64 (long long __coeff, int __exp)
static decimal64 make_decimal64 (unsigned long long __coeff, int __exp)
operator!= โ the "we are NOT the same" collection ๐
This is the biggest flex in the whole page. Every single cross-type combo of "are these two things not equal" that you could possibly want. All 45 of them. Yes, forty-five. Not me counting them for you. ๐ญ
bool operator!= (decimal128 __lhs, decimal128 __rhs)
bool operator!= (decimal128 __lhs, decimal32 __rhs)
bool operator!= (decimal128 __lhs, decimal64 __rhs)
bool operator!= (decimal128 __lhs, int __rhs)
bool operator!= (decimal128 __lhs, long __rhs)
bool operator!= (decimal128 __lhs, long long __rhs)
bool operator!= (decimal128 __lhs, unsigned int __rhs)
bool operator!= (decimal128 __lhs, unsigned long __rhs)
bool operator!= (decimal128 __lhs, unsigned long long __rhs)
bool operator!= (decimal32 __lhs, decimal128 __rhs)
bool operator!= (decimal32 __lhs, decimal32 __rhs)
bool operator!= (decimal32 __lhs, decimal64 __rhs)
bool operator!= (decimal32 __lhs, int __rhs)
bool operator!= (decimal32 __lhs, long __rhs)
bool operator!= (decimal32 __lhs, long long __rhs)
bool operator!= (decimal32 __lhs, unsigned int __rhs)
bool operator!= (decimal32 __lhs, unsigned long __rhs)
bool operator!= (decimal32 __lhs, unsigned long long __rhs)
bool operator!= (decimal64 __lhs, decimal128 __rhs)
bool operator!= (decimal64 __lhs, decimal32 __rhs)
bool operator!= (decimal64 __lhs, decimal64 __rhs)
bool operator!= (decimal64 __lhs, int __rhs)
bool operator!= (decimal64 __lhs, long __rhs)
bool operator!= (decimal64 __lhs, long long __rhs)
bool operator!= (decimal64 __lhs, unsigned int __rhs)
bool operator!= (decimal64 __lhs, unsigned long __rhs)
bool operator!= (decimal64 __lhs, unsigned long long __rhs)
bool operator!= (int __lhs, decimal128 __rhs)
bool operator!= (int __lhs, decimal32 __rhs)
bool operator!= (int __lhs, decimal64 __rhs)
bool operator!= (long __lhs, decimal128 __rhs)
bool operator!= (long __lhs, decimal32 __rhs)
bool operator!= (long __lhs, decimal64 __rhs)
bool operator!= (long long __lhs, decimal128 __rhs)
bool operator!= (long long __lhs, decimal32 __rhs)
bool operator!= (long long __lhs, decimal64 __rhs)
bool operator!= (unsigned int __lhs, decimal128 __rhs)
bool operator!= (unsigned int __lhs, decimal32 __rhs)
bool operator!= (unsigned int __lhs, decimal64 __rhs)
bool operator!= (unsigned long __lhs, decimal128 __rhs)
bool operator!= (unsigned long __lhs, decimal32 __rhs)
bool operator!= (unsigned long __lhs, decimal64 __rhs)
bool operator!= (unsigned long long __lhs, decimal128 __rhs)
bool operator!= (unsigned long long __lhs, decimal32 __rhs)
bool operator!= (unsigned long long __lhs, decimal64 __rhs)
operator* โ multiplication, but make it โจexhaustiveโจ
Same deal, bestie: every decimal-vs-decimal and decimal-vs-integer pairing. Notice how the return type changes depending on who's on the left โ like the result is whichever decimal type the operation is vibing with. So iconic of it. ๐ฅ
decimal128 operator* (decimal128 __lhs, decimal128 __rhs)
decimal128 operator* (decimal128 __lhs, decimal32 __rhs)
decimal128 operator* (decimal128 __lhs, decimal64 __rhs)
decimal128 operator* (decimal128 __lhs, int __rhs)
decimal128 operator* (decimal128 __lhs, long __rhs)
decimal128 operator* (decimal128 __lhs, long long __rhs)
decimal128 operator* (decimal128 __lhs, unsigned int __rhs)
decimal128 operator* (decimal128 __lhs, unsigned long __rhs)
decimal128 operator* (decimal128 __lhs, unsigned long long __rhs)
decimal128 operator* (decimal32 __lhs, decimal128 __rhs)
decimal32 operator* (decimal32 __lhs, decimal32 __rhs)
decimal64 operator* (decimal32 __lhs, decimal64 __rhs)
decimal32 operator* (decimal32 __lhs, int __rhs)
decimal32 operator* (decimal32 __lhs, long __rhs)
decimal32 operator* (decimal32 __lhs, long long __rhs)
decimal32 operator* (decimal32 __lhs, unsigned int __rhs)
decimal32 operator* (decimal32 __lhs, unsigned long __rhs)
decimal32 operator* (decimal32 __lhs, unsigned long long __rhs)
decimal128 operator* (decimal64 __lhs, decimal128 __rhs)
decimal64 operator* (decimal64 __lhs, decimal32 __rhs)
decimal64 operator* (decimal64 __lhs, decimal64 __rhs)
decimal64 operator* (decimal64 __lhs, int __rhs)
decimal64 operator* (decimal64 __lhs, long __rhs)
decimal64 operator* (decimal64 __lhs, long long __rhs)
decimal64 operator* (decimal64 __lhs, unsigned int __rhs)
decimal64 operator* (decimal64 __lhs, unsigned long __rhs)
decimal64 operator* (decimal64 __lhs, unsigned long long __rhs)
decimal128 operator* (int __lhs, decimal128 __rhs)
decimal32 operator* (int __lhs, decimal32 __rhs)
decimal64 operator* (int __lhs, decimal64 __rhs)
decimal128 operator* (long __lhs, decimal128 __rhs)
decimal32 operator* (long __lhs, decimal32 __rhs)
decimal64 operator* (long __lhs, decimal64 __rhs)
decimal128 operator* (long long __lhs, decimal128 __rhs)
decimal32 operator* (long long __lhs, decimal32 __rhs)
decimal64 operator* (long long __lhs, decimal64 __rhs)
decimal128 operator* (unsigned int __lhs, decimal128 __rhs)
decimal32 operator* (unsigned int __lhs, decimal32 __rhs)
decimal64 operator* (unsigned int __lhs, decimal64 __rhs)
decimal128 operator* (unsigned long __lhs, decimal128 __rhs)
decimal32 operator* (unsigned long __lhs, decimal32 __rhs)
decimal64 operator* (unsigned long __lhs, decimal64 __rhs)
decimal128 operator* (unsigned long long __lhs, decimal128 __rhs)
decimal32 operator* (unsigned long long __lhs, decimal32 __rhs)
decimal64 operator* (unsigned long long __lhs, decimal64 __rhs)
operator+ โ and yes, there's unary now too ๐
The glow-up here: alongside all the two-argument versions, you also get the unary plus for each decimal type โ decimal128 operator+ (decimal128 __rhs), decimal32 operator+ (decimal32 __rhs), decimal64 operator+ (decimal64 __rhs). One argument, main character energy, no notes. ๐
decimal128 operator+ (decimal128 __lhs, decimal128 __rhs)
decimal128 operator+ (decimal128 __lhs, decimal32 __rhs)
decimal128 operator+ (decimal128 __lhs, decimal64 __rhs)
decimal128 operator+ (decimal128 __lhs, int __rhs)
decimal128 operator+ (decimal128 __lhs, long __rhs)
decimal128 operator+ (decimal128 __lhs, long long __rhs)
decimal128 operator+ (decimal128 __lhs, unsigned int __rhs)
decimal128 operator+ (decimal128 __lhs, unsigned long __rhs)
decimal128 operator+ (decimal128 __lhs, unsigned long long __rhs)
decimal128 operator+ (decimal128 __rhs)
decimal128 operator+ (decimal32 __lhs, decimal128 __rhs)
decimal32 operator+ (decimal32 __lhs, decimal32 __rhs)
decimal64 operator+ (decimal32 __lhs, decimal64 __rhs)
decimal32 operator+ (decimal32 __lhs, int __rhs)
decimal32 operator+ (decimal32 __lhs, long __rhs)
decimal32 operator+ (decimal32 __lhs, long long __rhs)
decimal32 operator+ (decimal32 __lhs, unsigned int __rhs)
decimal32 operator+ (decimal32 __lhs, unsigned long __rhs)
decimal32 operator+ (decimal32 __lhs, unsigned long long __rhs)
decimal32 operator+ (decimal32 __rhs)
decimal128 operator+ (decimal64 __lhs, decimal128 __rhs)
decimal64 operator+ (decimal64 __lhs, decimal32 __rhs)
decimal64 operator+ (decimal64 __lhs, decimal64 __rhs)
decimal64 operator+ (decimal64 __lhs, int __rhs)
decimal64 operator+ (decimal64 __lhs, long __rhs)
decimal64 operator+ (decimal64 __lhs, long long __rhs)
decimal64 operator+ (decimal64 __lhs, unsigned int __rhs)
decimal64 operator+ (decimal64 __lhs, unsigned long __rhs)
decimal64 operator+ (decimal64 __lhs, unsigned long long __rhs)
decimal64 operator+ (decimal64 __rhs)
decimal128 operator+ (int __lhs, decimal128 __rhs)
decimal32 operator+ (int __lhs, decimal32 __rhs)
decimal64 operator+ (int __lhs, decimal64 __rhs)
decimal128 operator+ (long __lhs, decimal128 __rhs)
decimal32 operator+ (long __lhs, decimal32 __rhs)
decimal64 operator+ (long __lhs, decimal64 __rhs)
decimal128 operator+ (long long __lhs, decimal128 __rhs)
decimal32 operator+ (long long __lhs, decimal32 __rhs)
decimal64 operator+ (long long __lhs, decimal64 __rhs)
decimal128 operator+ (unsigned int __lhs, decimal128 __rhs)
decimal32 operator+ (unsigned int __lhs, decimal32 __rhs)
decimal64 operator+ (unsigned int __lhs, decimal64 __rhs)
decimal128 operator+ (unsigned long __lhs, decimal128 __rhs)
decimal32 operator+ (unsigned long __lhs, decimal32 __rhs)
decimal64 operator+ (unsigned long __lhs, decimal64 __rhs)
decimal128 operator+ (unsigned long long __lhs, decimal128 __rhs)
decimal32 operator+ (unsigned long long __lhs, decimal32 __rhs)
decimal64 operator+ (unsigned long long __lhs, decimal64 __rhs)
operator- โ subtraction (and unary minus, bestie, it's here too) ๐
Same structure as operator+, and yes the unary minus is in the building: decimal128 operator- (decimal128 __rhs) and decimal32 operator- (decimal32 __rhs) both showed up. (The list keeps going after this, so don't panic if it feels cut off โ that's just where this part ends. ๐)
decimal128 operator- (decimal128 __lhs, decimal128 __rhs)
decimal128 operator- (decimal128 __lhs, decimal32 __rhs)
decimal128 operator- (decimal128 __lhs, decimal64 __rhs)
decimal128 operator- (decimal128 __lhs, int __rhs)
decimal128 operator- (decimal128 __lhs, long __rhs)
decimal128 operator- (decimal128 __lhs, long long __rhs)
decimal128 operator- (decimal128 __lhs, unsigned int __rhs)
decimal128 operator- (decimal128 __lhs, unsigned long __rhs)
decimal128 operator- (decimal128 __lhs, unsigned long long __rhs)
decimal128 operator- (decimal128 __rhs)
decimal128 operator- (decimal32 __lhs, decimal128 __rhs)
decimal32 operator- (decimal32 __lhs, decimal32 __rhs)
decimal64 operator- (decimal32 __lhs, decimal64 __rhs)
decimal32 operator- (decimal32 __lhs, int __rhs)
decimal32 operator- (decimal32 __lhs, long __rhs)
decimal32 operator- (decimal32 __lhs, long long __rhs)
decimal32 operator- (decimal32 __lhs, unsigned int __rhs)
decimal32 operator- (decimal32 __lhs, unsigned long __rhs)
decimal32 operator- (decimal32 __lhs, unsigned long long __rhs)
decimal32 operator- (decimal32 __rhs)
decimal128 operator- (decimal64 __lhs, decimal128 __rhs)
decimal64 operator- (decimal64 __lhs, decimal32 __rhs)
decimal64 operator- (decimal64 __lhs, decimal64 __rhs)
decimal64 operator- (decimal64 __lhs, int __rhs)
decimal64 operator- (decimal64 __lhs, long __rhs)
decimal64 operator- (decimal64 __lhs, long long __rhs)
decimal64 operator- (decimal64 __lhs, unsigned int __rhs)
okay bestie we're still deep in the SYNOPSIS and the operator- guest list is not done yet โ here come the rest of the mixed-type ones plus that one lonely unary minus ๐
decimal64 operator- (decimal64 __lhs, unsigned long __rhs)
decimal64 operator- (decimal64 __lhs, unsigned long long __rhs)
decimal64 operator- (decimal64 __rhs)
decimal128 operator- (int __lhs, decimal128 __rhs)
decimal32 operator- (int __lhs, decimal32 __rhs)
decimal64 operator- (int __lhs, decimal64 __rhs)
decimal128 operator- (long __lhs, decimal128 __rhs)
decimal32 operator- (long __lhs, decimal32 __rhs)
decimal64 operator- (long __lhs, decimal64 __rhs)
decimal128 operator- (long long __lhs, decimal128 __rhs)
decimal32 operator- (long long __lhs, decimal32 __rhs)
decimal64 operator- (long long __lhs, decimal64 __rhs)
decimal128 operator- (unsigned int __lhs, decimal128 __rhs)
decimal32 operator- (unsigned int __lhs, decimal32 __rhs)
decimal64 operator- (unsigned int __lhs, decimal64 __rhs)
decimal128 operator- (unsigned long __lhs, decimal128 __rhs)
decimal32 operator- (unsigned long __lhs, decimal32 __rhs)
decimal64 operator- (unsigned long __lhs, decimal64 __rhs)
decimal128 operator- (unsigned long long __lhs, decimal128 __rhs)
decimal32 operator- (unsigned long long __lhs, decimal32 __rhs)
decimal64 operator- (unsigned long long __lhs, decimal64 __rhs)
notice how the integer can be on either side โ __lhs is an int and __rhs is a decimal, or the other way round, she does both ๐
and decimal64 operator- (decimal64 __rhs) is the unary one: one argument, no __lhs at all, just vibing alone, main character energy ๐.
next up: operator/ and bestie it is exhaustive โ every decimal width against every other decimal width and against every integer type, in both directions, fr fr ๐ฆ
decimal128 operator/ (decimal128 __lhs, decimal128 __rhs)
decimal128 operator/ (decimal128 __lhs, decimal32 __rhs)
decimal128 operator/ (decimal128 __lhs, decimal64 __rhs)
decimal128 operator/ (decimal128 __lhs, int __rhs)
decimal128 operator/ (decimal128 __lhs, long __rhs)
decimal128 operator/ (decimal128 __lhs, long long __rhs)
decimal128 operator/ (decimal128 __lhs, unsigned int __rhs)
decimal128 operator/ (decimal128 __lhs, unsigned long __rhs)
decimal128 operator/ (decimal128 __lhs, unsigned long long __rhs)
decimal128 operator/ (decimal32 __lhs, decimal128 __rhs)
decimal32 operator/ (decimal32 __lhs, decimal32 __rhs)
decimal64 operator/ (decimal32 __lhs, decimal64 __rhs)
decimal32 operator/ (decimal32 __lhs, int __rhs)
decimal32 operator/ (decimal32 __lhs, long __rhs)
decimal32 operator/ (decimal32 __lhs, long long __rhs)
decimal32 operator/ (decimal32 __lhs, unsigned int __rhs)
decimal32 operator/ (decimal32 __lhs, unsigned long __rhs)
decimal32 operator/ (decimal32 __lhs, unsigned long long __rhs)
decimal128 operator/ (decimal64 __lhs, decimal128 __rhs)
decimal64 operator/ (decimal64 __lhs, decimal32 __rhs)
decimal64 operator/ (decimal64 __lhs, decimal64 __rhs)
decimal64 operator/ (decimal64 __lhs, int __rhs)
decimal64 operator/ (decimal64 __lhs, long __rhs)
decimal64 operator/ (decimal64 __lhs, long long __rhs)
decimal64 operator/ (decimal64 __lhs, unsigned int __rhs)
decimal64 operator/ (decimal64 __lhs, unsigned long __rhs)
decimal64 operator/ (decimal64 __lhs, unsigned long long __rhs)
decimal128 operator/ (int __lhs, decimal128 __rhs)
decimal32 operator/ (int __lhs, decimal32 __rhs)
decimal64 operator/ (int __lhs, decimal64 __rhs)
decimal128 operator/ (long __lhs, decimal128 __rhs)
decimal32 operator/ (long __lhs, decimal32 __rhs)
decimal64 operator/ (long __lhs, decimal64 __rhs)
decimal128 operator/ (long long __lhs, decimal128 __rhs)
decimal32 operator/ (long long __lhs, decimal32 __rhs)
decimal64 operator/ (long long __lhs, decimal64 __rhs)
decimal128 operator/ (unsigned int __lhs, decimal128 __rhs)
decimal32 operator/ (unsigned int __lhs, decimal32 __rhs)
decimal64 operator/ (unsigned int __lhs, decimal64 __rhs)
decimal128 operator/ (unsigned long __lhs, decimal128 __rhs)
decimal32 operator/ (unsigned long __lhs, decimal32 __rhs)
decimal64 operator/ (unsigned long __lhs, decimal64 __rhs)
decimal128 operator/ (unsigned long long __lhs, decimal128 __rhs)
decimal32 operator/ (unsigned long long __lhs, decimal32 __rhs)
decimal64 operator/ (unsigned long long __lhs, decimal64 __rhs)
the result type follows the wider decimal in the room โ decimal32 paired with decimal64 gives you back a decimal64, decimal64 paired with decimal128 gives you back a decimal128, and anything with decimal128 is a decimal128. it's giving "whoever's biggest picks the outfit" โจ
then operator< pulls up with the exact same "every combo, both ways" energy, except these hand you back a bool ๐
bool operator< (decimal128 __lhs, decimal128 __rhs)
bool operator< (decimal128 __lhs, decimal32 __rhs)
bool operator< (decimal128 __lhs, decimal64 __rhs)
bool operator< (decimal128 __lhs, int __rhs)
bool operator< (decimal128 __lhs, long __rhs)
bool operator< (decimal128 __lhs, long long __rhs)
bool operator< (decimal128 __lhs, unsigned int __rhs)
bool operator< (decimal128 __lhs, unsigned long __rhs)
bool operator< (decimal128 __lhs, unsigned long long __rhs)
bool operator< (decimal32 __lhs, decimal128 __rhs)
bool operator< (decimal32 __lhs, decimal32 __rhs)
bool operator< (decimal32 __lhs, decimal64 __rhs)
bool operator< (decimal32 __lhs, int __rhs)
bool operator< (decimal32 __lhs, long __rhs)
bool operator< (decimal32 __lhs, long long __rhs)
bool operator< (decimal32 __lhs, unsigned int __rhs)
bool operator< (decimal32 __lhs, unsigned long __rhs)
bool operator< (decimal32 __lhs, unsigned long long __rhs)
bool operator< (decimal64 __lhs, decimal128 __rhs)
bool operator< (decimal64 __lhs, decimal32 __rhs)
bool operator< (decimal64 __lhs, decimal64 __rhs)
bool operator< (decimal64 __lhs, int __rhs)
bool operator< (decimal64 __lhs, long __rhs)
bool operator< (decimal64 __lhs, long long __rhs)
bool operator< (decimal64 __lhs, unsigned int __rhs)
bool operator< (decimal64 __lhs, unsigned long __rhs)
bool operator< (decimal64 __lhs, unsigned long long __rhs)
bool operator< (int __lhs, decimal128 __rhs)
bool operator< (int __lhs, decimal32 __rhs)
bool operator< (int __lhs, decimal64 __rhs)
bool operator< (long __lhs, decimal128 __rhs)
bool operator< (long __lhs, decimal32 __rhs)
bool operator< (long __lhs, decimal64 __rhs)
bool operator< (long long __lhs, decimal128 __rhs)
bool operator< (long long __lhs, decimal32 __rhs)
bool operator< (long long __lhs, decimal64 __rhs)
bool operator< (unsigned int __lhs, decimal128 __rhs)
bool operator< (unsigned int __lhs, decimal32 __rhs)
bool operator< (unsigned int __lhs, decimal64 __rhs)
bool operator< (unsigned long __lhs, decimal128 __rhs)
bool operator< (unsigned long __lhs, decimal32 __rhs)
bool operator< (unsigned long __lhs, decimal64 __rhs)
bool operator< (unsigned long long __lhs, decimal128 __rhs)
bool operator< (unsigned long long __lhs, decimal32 __rhs)
bool operator< (unsigned long long __lhs, decimal64 __rhs)
and operator==, same shape, same bool, same "we included literally every pairing" dedication ๐
bool operator== (decimal128 __lhs, decimal128 __rhs)
bool operator== (decimal128 __lhs, decimal32 __rhs)
bool operator== (decimal128 __lhs, decimal64 __rhs)
bool operator== (decimal128 __lhs, int __rhs)
bool operator== (decimal128 __lhs, long __rhs)
bool operator== (decimal128 __lhs, long long __rhs)
bool operator== (decimal128 __lhs, unsigned int __rhs)
bool operator== (decimal128 __lhs, unsigned long __rhs)
bool operator== (decimal128 __lhs, unsigned long long __rhs)
bool operator== (decimal32 __lhs, decimal128 __rhs)
bool operator== (decimal32 __lhs, decimal32 __rhs)
bool operator== (decimal32 __lhs, decimal64 __rhs)
bool operator== (decimal32 __lhs, int __rhs)
bool operator== (decimal32 __lhs, long __rhs)
bool operator== (decimal32 __lhs, long long __rhs)
bool operator== (decimal32 __lhs, unsigned int __rhs)
bool operator== (decimal32 __lhs, unsigned long __rhs)
bool operator== (decimal32 __lhs, unsigned long long __rhs)
bool operator== (decimal64 __lhs, decimal128 __rhs)
bool operator== (decimal64 __lhs, decimal32 __rhs)
bool operator== (decimal64 __lhs, decimal64 __rhs)
bool operator== (decimal64 __lhs, int __rhs)
bool operator== (decimal64 __lhs, long __rhs)
bool operator== (decimal64 __lhs, long long __rhs)
bool operator== (decimal64 __lhs, unsigned int __rhs)
bool operator== (decimal64 __lhs, unsigned long __rhs)
bool operator== (decimal64 __lhs, unsigned long long __rhs)
bool operator== (int __lhs, decimal128 __rhs)
bool operator== (int __lhs, decimal32 __rhs)
bool operator== (int __lhs, decimal64 __rhs)
bool operator== (long __lhs, decimal128 __rhs)
bool operator== (long __lhs, decimal32 __rhs)
bool operator== (long __lhs, decimal64 __rhs)
bool operator== (long long __lhs, decimal128 __rhs)
bool operator== (long long __lhs, decimal32 __rhs)
bool operator== (long long __lhs, decimal64 __rhs)
bool operator== (unsigned int __lhs, decimal128 __rhs)
bool operator== (unsigned int __lhs, decimal32 __rhs)
bool operator== (unsigned int __lhs, decimal64 __rhs)
bool operator== (unsigned long __lhs, decimal128 __rhs)
bool operator== (unsigned long __lhs, decimal32 __rhs)
bool operator== (unsigned long __lhs, decimal64 __rhs)
bool operator== (unsigned long long __lhs, decimal128 __rhs)
bool operator== (unsigned long long __lhs, decimal32 __rhs)
bool operator== (unsigned long long __lhs, decimal64 __rhs)
and then operator> rolls in like she owns the place ๐ same pattern, still bool, and heads up bestie โ this list does not end here, it keeps going into the next part, so we stop exactly where the page stops, no cap ๐
bool operator> (decimal128 __lhs, decimal128 __rhs)
bool operator> (decimal128 __lhs, decimal32 __rhs)
bool operator> (decimal128 __lhs, decimal64 __rhs)
bool operator> (decimal128 __lhs, int __rhs)
bool operator> (decimal128 __lhs, long __rhs)
bool operator> (decimal128 __lhs, long long __rhs)
bool operator> (decimal128 __lhs, unsigned int __rhs)
bool operator> (decimal128 __lhs, unsigned long __rhs)
bool operator> (decimal128 __lhs, unsigned long long __rhs)
bool operator> (decimal32 __lhs, decimal128 __rhs)
bool operator> (decimal32 __lhs, decimal32 __rhs)
bool operator> (decimal32 __lhs, decimal64 __rhs)
bool operator> (decimal32 __lhs, int __rhs)
bool operator> (decimal32 __lhs, long __rhs)
bool operator> (decimal32 __lhs, long long __rhs)
bool operator> (decimal32 __lhs, unsigned int __rhs)
bool operator> (decimal32 __lhs, unsigned long __rhs)
bool operator> (decimal32 __lhs, unsigned long long __rhs)
bool operator> (decimal64 __lhs, decimal128 __rhs)
bool operator> (decimal64 __lhs, decimal32 __rhs)
bool operator> (decimal64 __lhs, decimal64 __rhs)
bool operator> (decimal64 __lhs, int __rhs)
bool operator> (decimal64 __lhs, long __rhs)
bool operator> (decimal64 __lhs, long long __rhs)
bool operator> (decimal64 __lhs, unsigned int __rhs)
bool operator> (decimal64 __lhs, unsigned long __rhs)
bool operator> (decimal64 __lhs, unsigned long long __rhs)
bool operator> (int __lhs, decimal128 __rhs)
bool operator> (int __lhs, decimal32 __rhs)
bool operator> (int __lhs, decimal64 __rhs)
bool operator> (long __lhs, decimal128 __rhs)
bool operator> (long __lhs, decimal32 __rhs)
bool operator> (long __lhs, decimal64 __rhs)
bool operator> (long long __lhs, decimal128 __rhs)
bool operator> (long long __lhs, decimal32 __rhs)
bool operator> (long long __lhs, decimal64 __rhs)
bool operator> (unsigned int __lhs, decimal128 __rhs)
bool operator> (unsigned int __lhs, decimal32 __rhs)
bool operator> (unsigned int __lhs, decimal64 __rhs)
bool operator> (unsigned long __lhs, decimal128 __rhs)
bool operator> (unsigned long __lhs, decimal32 __rhs)
bool operator> (unsigned long __lhs, decimal64 __rhs)
bool operator> (unsigned long long __lhs, decimal128 __rhs)
bool operator> (unsigned long long __lhs, decimal32 __rhs)
...and the list just keeps going, bestie, I'm not even joking ๐ญ but we do not skip a single overload in this house, so here's the rest of them, every last one, periodt ๐
bool operator> (unsigned long long __lhs, decimal64 __rhs)
bool operator>= (decimal128 __lhs, decimal128 __rhs)
bool operator>= (decimal128 __lhs, decimal32 __rhs)
bool operator>= (decimal128 __lhs, decimal64 __rhs)
bool operator>= (decimal128 __lhs, int __rhs)
bool operator>= (decimal128 __lhs, long __rhs)
bool operator>= (decimal128 __lhs, long long __rhs)
bool operator>= (decimal128 __lhs, unsigned int __rhs)
bool operator>= (decimal128 __lhs, unsigned long __rhs)
bool operator>= (decimal128 __lhs, unsigned long long __rhs)
bool operator>= (decimal32 __lhs, decimal128 __rhs)
bool operator>= (decimal32 __lhs, decimal32 __rhs)
bool operator>= (decimal32 __lhs, decimal64 __rhs)
bool operator>= (decimal32 __lhs, int __rhs)
bool operator>= (decimal32 __lhs, long __rhs)
bool operator>= (decimal32 __lhs, long long __rhs)
bool operator>= (decimal32 __lhs, unsigned int __rhs)
bool operator>= (decimal32 __lhs, unsigned long __rhs)
bool operator>= (decimal32 __lhs, unsigned long long __rhs)
bool operator>= (decimal64 __lhs, decimal128 __rhs)
bool operator>= (decimal64 __lhs, decimal32 __rhs)
bool operator>= (decimal64 __lhs, decimal64 __rhs)
bool operator>= (decimal64 __lhs, int __rhs)
bool operator>= (decimal64 __lhs, long __rhs)
bool operator>= (decimal64 __lhs, long long __rhs)
bool operator>= (decimal64 __lhs, unsigned int __rhs)
bool operator>= (decimal64 __lhs, unsigned long __rhs)
bool operator>= (decimal64 __lhs, unsigned long long __rhs)
bool operator>= (int __lhs, decimal128 __rhs)
bool operator>= (int __lhs, decimal32 __rhs)
bool operator>= (int __lhs, decimal64 __rhs)
bool operator>= (long __lhs, decimal128 __rhs)
bool operator>= (long __lhs, decimal32 __rhs)
bool operator>= (long __lhs, decimal64 __rhs)
bool operator>= (long long __lhs, decimal128 __rhs)
bool operator>= (long long __lhs, decimal32 __rhs)
bool operator>= (long long __lhs, decimal64 __rhs)
bool operator>= (unsigned int __lhs, decimal128 __rhs)
bool operator>= (unsigned int __lhs, decimal32 __rhs)
bool operator>= (unsigned int __lhs, decimal64 __rhs)
bool operator>= (unsigned long __lhs, decimal128 __rhs)
bool operator>= (unsigned long __lhs, decimal32 __rhs)
bool operator>= (unsigned long __lhs, decimal64 __rhs)
bool operator>= (unsigned long long __lhs, decimal128 __rhs)
bool operator>= (unsigned long long __lhs, decimal32 __rhs)
bool operator>= (unsigned long long __lhs, decimal64 __rhs)
โจ Detailed Description โจ
Okay so what even is this whole page? It's all about ISO/IEC TR 24733 โ that's the standard for decimal floating-point arithmetic. ๐ฆ That's the vibe. That's the entire assignment. No cap.
๐ง Function Documentation ๐ง
long long std::decimal::decimal32_to_long_long (decimal32 __d) ๐
Non-conforming extension: conversion to integral type. ๐
Heads up bestie: this one is a non-conforming extension โ it's not part of the standard, so don't expect it to show up everywhere. It takes adecimal32 __dand gives you back along long. That's the whole deal. ๐
๐ Author ๐
Generated automatically by <strong>Doxygen</strong> for <strong>libstdc++</strong> from the source code.</purgle>
(no actual human wrote this prose, it just materialized โจ iconic behaviour honestly)
And that's a wrap on the whole page, bestie!! ๐ซถ๐ธ We read every single overload, we survived, we're stronger for it. The source of all this is libstdc++ and the page itself lives in section 3 of the manual as std::decimal(3) โ go forth and do decimal math responsibly, mwah ๐๐๐ฆ
๐ฆ where this page comes from
- arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 ยท GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
- centos-stream 10: gcc-toolset-15-libstdc++-docs 15.2.1-8.1.el10 ยท GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- centos-stream 10: gcc-toolset-16-libstdc++-docs 16.2.1-1.3.el10 ยท GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- centos-stream 10: libstdc++-docs 14.4.1-4.el10 ยท GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- fedora 43: libstdc++-docs 15.2.1-2.fc43 ยท GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- fedora 43: libstdc++-docs 15.3.1-1.fc43 ยท GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- fedora 44: libstdc++-docs 16.0.1-0.10.fc44 ยท GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- fedora 44: libstdc++-docs 16.2.1-2.fc44
- fedora 44: libstdc++-docs 16.2.1-3.fc44 ยท GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms