On some platforms like MSVC, NaN prints as "-nan(ind)". This
is a bit needlessly ugly, so print "NaN" on all platforms
consistently.
This fixes a test failure on MSVC.
(cherry picked from commit dd17f24c04)
This allows a failing test to report which case failed more clearly.
Add a quick helper to make an "in -> out" context string.
(cherry picked from commit 3f32dc9a64)