An exhaustive test on a HPC reveals rounding errors in the last bit for some cases. Working on a fix now.