UMULEXTENDED(3G)
β¨ UMULEXTENDED(3G) β¨
okay bestie, gather round, because we're about to talk about umulExtended π this is a 3G manpage, which is giving "OpenGL shading language" energy, and honestly? it's a whole vibe. no cap.
πΈ NAME πΈ
umulExtended β the girl who performs a 32- by 32-bit multiply to produce a 64-bit result β¨ like, she takes two smol numbers and makes one big number. iconic behavior tbh.
π DECLARATION π
here's the literal signature, verbatim, don't come for me:
void umulExtended(genUType x, genUType y, out genUType msb,
out genUType lsb);
void imulExtended(genIType x, genIType y, out genIType msb,
out genIType lsb);
look at her. two functions. one unsigned, one signed. slay π
π¦ PARAMETERS π¦
xβ the first multiplicand, aka the first number we're multiplying. she's the main character of the left side π«Άyβ the second multiplicand. yes, the original really does have two periods there and honestly? relatable, she's just excited. πmsbβ the variable that receives the most significant word of the product. that's the fancy high part, the top 32 bits, the VIP section πlsbβ the variable that receives the least significant word of the product. the bottom 32 bits, the humble queen doing the groundwork πΈ
π DESCRIPTION π
so, umulExtended and imulExtended perform multiplication of the two 32-bit integer quantities x and y, producing a 64-bit integer result. like, two 32-bit girlies walk in, one 64-bit result walks out. the way that math just works π
the 32 least significant bits of this product are returned in lsb, and the 32 most significant bits are returned in msb. so the product gets split in half and handed out like friendship bracelets π
umulExtended and imulExtended perform unsigned and signed multiplication, respectively. so pick your fighter: unsigned for the unbothered, signed for the ones who have feelings about negative numbers. periodt.
π VERSION SUPPORT π
this is the part where we vibe check which OpenGL Shading Language versions let umulExtended into the club. the original had a whole grid situation, but here's the tea in list form, same facts, cuter delivery:
OpenGL Shading Language Version columns were: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 4.00, 4.10, 4.20, 4.30, 4.40, 4.50.
- Function Name:
umulExtended1.10β-(not invited π)1.20β-(still not invited π)1.30β-(nope π)1.40β-(nope π)1.50β-(nope π)3.30β-(nope π)4.00ββ(she's here!! π₯)4.10ββ(still here β¨)4.20ββ(still here β¨)4.30ββ(still here β¨)4.40ββ(still here β¨)4.50ββ(still here β¨)
so basically she didn't exist until 4.00 and then she showed up and stayed. glow up arc complete π
π SEE ALSO π
uaddCarry()β go say hi to her too, she's also part of the extended-math friend group π«Ά
π COPYRIGHT π
Copyright Β© 2011-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.
π COPYRIGHT (again, but shorter) π
Copyright Β© 2011-2014 Khronos Group
and that's the whole page bestie, we ate and left no crumbs π
this iconic little writeup came from the [FIXME: source] of the manual, dated 01/03/2018, and it's the UMULEXTENDED(3G) page through and through β no facts were harmed, no options were dropped, we just gave her a wardrobe change π
β¨
π¦ where this page comes from
- ubuntu jammy: opengl-4-man-doc 1.0~svn33624-1 Β· SGI-Free-Software-B-License-2
- ubuntu noble: opengl-4-man-doc 1.0~svn33624-1 Β· SGI-Free-Software-B-License-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms