std::decimal::decimal128(3cxx)
π NAME π
std::decimal::decimal128 β 3.2.4 Class decimal128. This is the 3cxx manual page, and yes bestie, weβre getting into the decimal128 lore β¨
πΈ SYNOPSIS πΈ
#include <decimal>
π Public Types π
typedef float __decfloat128β the public type alias, exactly as written. Tiny typedef, main-character energy π
π§ Public Member Functions π§
Constructors β every official way to make a decimal128 in this list, no cap:
decimal128 (__decfloat128 __z)β constructor from__decfloat128 __z; the original note says:Conforming extension: Conversion from scalar decimal type.β¨decimal128 (decimal32 d32)β constructor from adecimal32 d32πdecimal128 (decimal64 d64)β constructor from adecimal64 d64πdecimal128 (double __r)β constructor from adouble __rπ¦decimal128 (float __r)β constructor from afloat __rπΈdecimal128 (int __z)β constructor from anint __zπdecimal128 (long __z)β constructor from along __zπ«Άdecimal128 (long double __r)β constructor from along double __rπdecimal128 (long long __z)β constructor from along long __zπ₯decimal128 (unsigned int __z)β constructor from anunsigned int __zπdecimal128 (unsigned long __z)β constructor from anunsigned long __zπdecimal128 (unsigned long long __z)β constructor from anunsigned long long __zβ
Accessors & conversion:
__decfloat128 __getval (void)β getter vibes: returns__decfloat128, takesvoidπvoid __setval (__decfloat128 __x)β setter vibes: takes__decfloat128 __x, returnsvoidπ§operator long long () constβ conversion operator tolong long, and itβsconstπ«
Compound multiply *=:
decimal128 & operator*= (decimal128 __rhs)β*=with adecimal128 __rhs, returnsdecimal128 &π₯decimal128 & operator*= (decimal32 __rhs)β*=with adecimal32 __rhs, returnsdecimal128 &π₯decimal128 & operator*= (decimal64 __rhs)β*=with adecimal64 __rhs, returnsdecimal128 &β¨decimal128 & operator*= (int __rhs)β*=with anint __rhs, returnsdecimal128 &πdecimal128 & operator*= (long __rhs)β*=with along __rhs, returnsdecimal128 &πdecimal128 & operator*= (long long __rhs)β*=with along long __rhs, returnsdecimal128 &π¦decimal128 & operator*= (unsigned int __rhs)β*=with anunsigned int __rhs, returnsdecimal128 &πΈdecimal128 & operator*= (unsigned long __rhs)β*=with anunsigned long __rhs, returnsdecimal128 &πdecimal128 & operator*= (unsigned long long __rhs)β*=with anunsigned long long __rhs, returnsdecimal128 &π«Ά
Increment ++:
decimal128 & operator++ ()β prefix++, returnsdecimal128 &β‘decimal128 operator++ (int)β postfix++, takes anint, returnsdecimal128π«
Compound add +=:
decimal128 & operator+= (decimal128 __rhs)β+=with adecimal128 __rhs, returnsdecimal128 &π₯decimal128 & operator+= (decimal32 __rhs)β+=with adecimal32 __rhs, returnsdecimal128 &π₯decimal128 & operator+= (decimal64 __rhs)β+=with adecimal64 __rhs, returnsdecimal128 &β¨decimal128 & operator+= (int __rhs)β+=with anint __rhs, returnsdecimal128 &πdecimal128 & operator+= (long __rhs)β+=with along __rhs, returnsdecimal128 &πdecimal128 & operator+= (long long __rhs)β+=with along long __rhs, returnsdecimal128 &π¦decimal128 & operator+= (unsigned int __rhs)β+=with anunsigned int __rhs, returnsdecimal128 &πΈdecimal128 & operator+= (unsigned long __rhs)β+=with anunsigned long __rhs, returnsdecimal128 &πdecimal128 & operator+= (unsigned long long __rhs)β+=with anunsigned long long __rhs, returnsdecimal128 &π«Ά
Decrement --:
decimal128 & operator-- ()β prefix--, returnsdecimal128 &β‘decimal128 operator-- (int)β postfix--, takes anint, returnsdecimal128π«
Compound subtract -=:
decimal128 & operator-= (decimal128 __rhs)β-=with adecimal128 __rhs, returnsdecimal128 &π₯decimal128 & operator-= (decimal32 __rhs)β-=with adecimal32 __rhs, returnsdecimal128 &π₯decimal128 & operator-= (decimal64 __rhs)β-=with adecimal64 __rhs, returnsdecimal128 &β¨decimal128 & operator-= (int __rhs)β-=with anint __rhs, returnsdecimal128 &πdecimal128 & operator-= (long __rhs)β-=with along __rhs, returnsdecimal128 &πdecimal128 & operator-= (long long __rhs)β-=with along long __rhs, returnsdecimal128 &π¦decimal128 & operator-= (unsigned int __rhs)β-=with anunsigned int __rhs, returnsdecimal128 &πΈdecimal128 & operator-= (unsigned long __rhs)β-=with anunsigned long __rhs, returnsdecimal128 &πdecimal128 & operator-= (unsigned long long __rhs)β-=with anunsigned long long __rhs, returnsdecimal128 &π«Ά
Compound divide /=:
decimal128 & operator/= (decimal128 __rhs)β/=with adecimal128 __rhs, returnsdecimal128 &π₯decimal128 & operator/= (decimal32 __rhs)β/=with adecimal32 __rhs, returnsdecimal128 &π₯decimal128 & operator/= (decimal64 __rhs)β/=with adecimal64 __rhs, returnsdecimal128 &β¨decimal128 & operator/= (int __rhs)β/=with anint __rhs, returnsdecimal128 &πdecimal128 & operator/= (long __rhs)β/=with along __rhs, returnsdecimal128 &πdecimal128 & operator/= (long long __rhs)β/=with along long __rhs, returnsdecimal128 &π¦decimal128 & operator/= (unsigned int __rhs)β/=with anunsigned int __rhs, returnsdecimal128 &πΈdecimal128 & operator/= (unsigned long __rhs)β/=with anunsigned long __rhs, returnsdecimal128 &πdecimal128 & operator/= (unsigned long long __rhs)β/=with anunsigned long long __rhs, returnsdecimal128 &π«Ά
β¨ Detailed Description β¨
3.2.4 Class decimal128. Thatβs the whole detailed description, bestie β short, sweet, and absolutely iconic π
π οΈ Constructor & Destructor Documentation π οΈ
π« std::decimal::decimal128::decimal128 (__decfloat128 __z) [inline] π«
Conforming extension: Conversion from scalar decimal type. π
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. So the βauthorβ is Doxygen plus libstdc++ source, not a mysterious human β respect the pipeline π«Ά
Cute sign-off π«Ά: the footerβs source/version is libstdc++, and the footerβs page stamp is std::decimal::decimal128(3cxx). The original footer has no separate date line, so weβre not inventing one β love that for us π
β¨
π¦ where this page comes from
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms