← Top stories The KL Divergence Is Never Negative, Except in PyTorch ↗ (opens external site) 97 points by Anon84 3 days ago | arxiv.org | 40 comments on HN ↗ View full thread · View on Hacker News Comment thread (5) contravariant | 3 days ago | parent | reply I mean either way sqrt(-0)^2 fails to equal -0, so both option are annoying.The real answer would be something like 0i, but that's not available. Replies (2) pwdisswordfishq | 3 days ago | parent | reply Why not −0i? Replies (2) AnimalMuppet | 3 days ago | parent | reply Because i is not a meaningful concept in floating point numbers. contravariant | 3 days ago | parent | reply It's customary to use the branch cut where sqrt(-1) = i.Honestly it doesn't really matter but that's because you can't actually tell i and -i apart. setopt | 3 days ago | parent | reply Next time we revise the floating point standard, we should add an "i bit" :)
The real answer would be something like 0i, but that's not available.
Replies (2)
Replies (2)
Honestly it doesn't really matter but that's because you can't actually tell i and -i apart.