This is an edge case bug, but it's enough to give me a headache in PR #95717. torch.exp(inf + infj) for CPU gives different results from CUDA and C++ std. However ...