725
submitted 10 months ago by Kajika@lemmy.ml to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] Omega_Haxors@lemmy.ml 7 points 10 months ago* (last edited 10 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

this post was submitted on 08 Feb 2024
725 points (99.3% liked)

Programmer Humor

32745 readers
105 users here now

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

Rules:

founded 5 years ago
MODERATORS