LDEXP(3G)

πŸ“¦
version 1.0~svn33624 Β· 4 versions
, in ubuntu jammy, ubuntu noble

✨ LDEXP(3G) ✨

okay bestie, so this is ldexp β€” literally the glow-up function that takes a lil significand and a whole exponent and assembles a floating point number out of them. iconic. πŸ’… (it's page 3G if you were wondering, which is the OpenGL shading language manual section, iykyk ✨)


🌸 NAME 🌸

ldexp β€” assemble a floating point number from a value and exponent


πŸŽ€ DECLARATION πŸŽ€

genType ldexp(genType x, genIType exp);

genDType ldexp(genDType x, genIType exp);

like. two of them. one for the regular girlies, one for the double girlies. slay 🫢


πŸ’– PARAMETERS πŸ’–

  • x β€” the value that's gonna serve as your source of significand. that's the lil guy getting scaled up πŸ’«
  • out exp β€” the value used as your source of exponent. that's the power-of-two energy right there πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

so ldexp builds a floating point number out of x and the matching integral exponent of two that's sitting in exp. and it returns:

significand β‹… 2 exponent

which is, like, the whole vibe. you bring the significand, exp brings the twos, they combine, boom. πŸ”₯

⚠️ but listen β€” if this product is too large to be represented in the floating point type, the result is undefined. no cap. so don't be out here overflowing your float and then acting surprised, bestie 😭 it's giving chaos and we do not want that.

🌈 VERSION SUPPORT 🌈

here's the vibe check on when these girlies actually showed up in the OpenGL Shading Language versions. (short version: not for a long minute, then all at once ✨)

⭐ ldexp (genType)

  • OpenGL Shading Language 1.10 β€” -
  • OpenGL Shading Language 1.20 β€” -
  • OpenGL Shading Language 1.30 β€” -
  • OpenGL Shading Language 1.40 β€” -
  • OpenGL Shading Language 1.50 β€” -
  • OpenGL Shading Language 3.30 β€” -
  • OpenGL Shading Language 4.00 β€” βœ”
  • OpenGL Shading Language 4.10 β€” βœ”
  • OpenGL Shading Language 4.20 β€” βœ”
  • OpenGL Shading Language 4.30 β€” βœ”
  • OpenGL Shading Language 4.40 β€” βœ”
  • OpenGL Shading Language 4.50 β€” βœ”

πŸ‘‘ ldexp (genDType)

  • OpenGL Shading Language 1.10 β€” -
  • OpenGL Shading Language 1.20 β€” -
  • OpenGL Shading Language 1.30 β€” -
  • OpenGL Shading Language 1.40 β€” -
  • OpenGL Shading Language 1.50 β€” -
  • OpenGL Shading Language 3.30 β€” -
  • OpenGL Shading Language 4.00 β€” βœ”
  • OpenGL Shading Language 4.10 β€” βœ”
  • OpenGL Shading Language 4.20 β€” βœ”
  • OpenGL Shading Language 4.30 β€” βœ”
  • OpenGL Shading Language 4.40 β€” βœ”
  • OpenGL Shading Language 4.50 β€” βœ”

so yeah, 4.00 is when it ate and never looked back. periodt. πŸ’œ


🧚 SEE ALSO 🧚

  • frexp() β€” the reverse-bestie, the one who takes apart the float. they're a matching set, your honor πŸŽ€

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 Β© 2011-2014 Khronos Group


and that's the whole page, bestie!! 🫢 this was source [FIXME: source], dated 01/03/2018, living under LDEXP(3G) β€” go forth and assemble your floats responsibly, mwah πŸ’–βœ¨

πŸ“¦ where this page comes from