nifty@lemmy.world to Programmer Humor@programming.dev · 8 months agoStop using floatslemmy.worldimagemessage-square73fedilinkarrow-up11arrow-down10
arrow-up11arrow-down1imageStop using floatslemmy.worldnifty@lemmy.world to Programmer Humor@programming.dev · 8 months agomessage-square73fedilink
minus-squarezaphod@feddit.delinkfedilinkarrow-up0·edit-28 months agoI think you got that wrong, you got +Inf, -Inf and two NaNs, but they’re both just NaN. As you wrote signed NaN makes no sense, though technically speaking they still have a sign bit.
minus-squarefrezik@midwest.sociallinkfedilinkarrow-up0·8 months agoRight, there’s no -NaN. There are two different values of NaN. Which is why I tried to separate that clause, but maybe it wasn’t clear enough.
I think you got that wrong, you got +Inf, -Inf and two NaNs, but they’re both just NaN. As you wrote signed NaN makes no sense, though technically speaking they still have a sign bit.
Right, there’s no -NaN. There are two different values of NaN. Which is why I tried to separate that clause, but maybe it wasn’t clear enough.