FREXP(3G)
πΈ NAME πΈ
okay so this is the FREXP(3G) manual page, and the original header had a little [FIXME: manual] placeholder in it, which is giving "we'll finish this later" energy. No cap. But the function itself? lowkey iconic. Let's get into it. π«Ά
frexp - split a floating point number
π DECLARATION π
here's the exact signatures, bestie, copy them character for character:
genType frexp(genType x, out genIType exp);
genDType frexp(genDType x, out genIType exp);
π PARAMETERS π
xβ the value from which significand and exponent are to be extracted. it's the input, the main character of this operation.out expβ the variable into which to place the exponent. output parameter behavior, fr fr.
π« DESCRIPTION π«
frexp extracts x into a floating-point significand in the range [0.5, 1.0) and in integral exponent of two, such that:
x = significand β
2 exponent
The significand is returned by the function and the exponent is returned in the output parameter exp. so like, one comes back as the return value and the other gets written into exp.
For a floating-point value of zero, the significand and exponent are both zero. zero in, zero out, balanced.
warning bestie: for a floating-point value that is an infinity or a floating-point NaN, the results are undefined. undefined behavior is not the vibe. do not collect $200.
π VERSION SUPPORT π
the original table is about OpenGL Shading Language Version support. No tables here because we're in terminal-coded markdown, but every single cell is below, periodt:
- Function Name:
frexp(genType) β OpenGL Shading Language Version: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:
frexp(genDType) β OpenGL Shading Language Version:1.10:-,1.20:-,1.30:-,1.40:-,1.50:-,3.30:-,4.00:β,4.10:β,4.20:β,4.30:β,4.40:β,4.50:β
so both genType and genDType versions are a no-show for 1.10 through 1.50 and 3.30, then they ate from 4.00 all the way through 4.50. π
π SEE ALSO π
ldexp()
yes bestie, go read that one too, they're linked in spirit.
π 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 π
Copyright Β© 2011-2014 Khronos Group
and that's the whole page, bestie. This came from [FIXME: source], dated 01/03/2018, for FREXP(3G). bye bye, stay slaying those floating point splits. π¦β¨
π¦ 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