jckarter

everyone already knows i'm a dog

the swift programming language is my fault to some degree. mostly here to see dogs, shitpost, fix old computers, and/or talk about math and weird computer programming things. for effortposts check the #longpost pinned tag. asks are open.


email
mailto:joe@duriansoftware.com
discord
jckarter

jckarter
@jckarter

pow(0.0, 0.0) should be:

  • 0.0 when only the first argument is a constant expression
  • 1.0 when only the second argument is a constant expression
  • crashing the program in all other circumstances

bem
@bem

pow(0.0, x) should be 0 for all x, but it should be a larger and larger 0 as x approaches 0. examples:

  • pow(0.0, 1.0) -> 0.0 // normal sized zero
  • pow(0.0, 0.5) -> 0.0 // quadratically larger zero

pow(0.0, 0.0) is a zero so large that it takes infinite space and crashes the program due to framebuffer exhaustion


You must log in to comment.

in reply to @bem's post:

The same thing happens when you try to draw a window with OpenGL and don’t get it exactly right. The screen isn’t black, it’s just drawing a zero so big the glyph stroke covers the entire screen