LOG(3G)

๐Ÿ“ฆ
version 1.0~svn33624 ยท 4 versions
, in ubuntu jammy, ubuntu noble

โœจ LOG(3G) โœจ

okay bestie, gather round ๐Ÿ’– this is the manual page for log, from section 3G of the manual (yes, the OpenGL shading language corner of the docs ๐ŸŽ€). It's giving "math but make it shader", and honestly? Iconic.


๐ŸŒธ NAME ๐ŸŒธ

log โ€” return the natural logarithm of the parameter ๐Ÿงฎโœจ


๐Ÿ’… DECLARATION ๐Ÿ’…

genType log(genType x);

That's it. That's the whole signature. Simple, clean, main character energy fr fr ๐Ÿ‘‘


๐ŸŽ€ PARAMETERS ๐ŸŽ€

  • x โ€” the value you want to take the natural logarithm of. Hand it over and let log do its thing ๐Ÿ’–

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

So log returns the natural logarithm of x, which means it gives you back the value y that satisfies:

x = e^y
โš ๏ธ okay so important: the result is undefined if x โ‰ค 0. Not "weird", not "surprising" โ€” undefined. So don't be out here logging zero or negative numbers and then acting shocked when things go sideways ๐Ÿ˜ญ๐Ÿ’€

๐ŸŒˆ VERSION SUPPORT ๐ŸŒˆ

Bestie here's the vibe check: this function is supported in every version of the OpenGL Shading Language listed. Every. Single. One. No cap ๐Ÿ”ฅ

The table in the original tracks two column groups: Function Name and OpenGL Shading Language Version. And the row is log (genType). Here's the receipts โœจ:

  • 1.10 โ€” โœ”
  • 1.20 โ€” โœ”
  • 1.30 โ€” โœ”
  • 1.40 โ€” โœ”
  • 1.50 โ€” โœ”
  • 3.30 โ€” โœ”
  • 4.00 โ€” โœ”
  • 4.10 โ€” โœ”
  • 4.20 โ€” โœ”
  • 4.30 โ€” โœ”
  • 4.40 โ€” โœ”
  • 4.50 โ€” โœ”

Twelve for twelve. She ate and left no crumbs ๐Ÿ‘‘๐Ÿ’…


๐ŸŒธ SEE ALSO ๐ŸŒธ

Go be nosy, bestie, these are the siblings ๐Ÿ’œ

  • sin()
  • cos()
  • sinh()
  • cosh()

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 ๐Ÿซถ source says [FIXME: source] (yeah, they left it as a FIXME, we love that for them ๐Ÿ™ˆ) and the date on this one is 01/03/2018. LOG(3G) forever, mwah ๐Ÿ’‹โœจ

๐Ÿ“ฆ where this page comes from