Unfortunately, someone else had this idea before you.
Arithmetic operations with saturation for integers, either unsigned saturation or signed saturation, have been introduced in personal computers since Intel Pentium MMX (launched in January 1997). A few other CPUs and DSPs had such operations much earlier.
"Saturation" means that the highest representable number, e.g. 0xFFFFFFFF, is interpreted as positive infinity and all operations where it appears as an operand are defined accordingly.
While whatever CPU you have in your computer or smartphone certainly supports arithmetic with integer infinities, such operations are not available in the high-level programming languages. So in order to use them, you have to use assembly language, inline assembly language in a high-level language or compiler intrinsics that give access to the corresponding machine instructions.
Assuming your representation's infinity is size of ℵ₀, I set my representation's 0xFFFF_FFFF to the size of ℵ₁. Similarly, if you choose ℵ_(n), I'm choosing ℵ_(n+1).
adrian_b|26 days ago
Arithmetic operations with saturation for integers, either unsigned saturation or signed saturation, have been introduced in personal computers since Intel Pentium MMX (launched in January 1997). A few other CPUs and DSPs had such operations much earlier.
"Saturation" means that the highest representable number, e.g. 0xFFFFFFFF, is interpreted as positive infinity and all operations where it appears as an operand are defined accordingly.
While whatever CPU you have in your computer or smartphone certainly supports arithmetic with integer infinities, such operations are not available in the high-level programming languages. So in order to use them, you have to use assembly language, inline assembly language in a high-level language or compiler intrinsics that give access to the corresponding machine instructions.
abcde666777|26 days ago
deathanatos|27 days ago
LoganDark|27 days ago
verdverm|26 days ago
armada651|27 days ago
unknown|27 days ago
[deleted]