this post was submitted on 08 Feb 2024
514 points (99.4% liked)

Programmer Humor

32398 readers
570 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Omega_Haxors@lemmy.ml 4 points 9 months ago* (last edited 9 months ago)

The funniest thing about NaNs is that they're actually coded so you can see what caused it if you look at the binary. Only problem is; due to the nature of NaNs, that code is almost always going to resolve to "tried to perform arithmetic on a NaN"

There are also coded NaNs which are defined and sometimes useful, such as +/-INF, MAX, MIN (epsilon), and Imaginary