Ooow ... wasn't aware that perl did that. In the mpfr library, the mpfr_cmp(x,y) function will return -1 if x<y, +1 if x>y. Otherwise it returns 0 (and sets the erange flag iff one/both of the arguments is a nan).
So, I'm left wondering whether, in Math::MPFR (which more-or-less wraps the mpfr library), the spaceship operator (which overloads the mpfr_cmp function) should:
a) adhere to mpfr library behaviour and return 0 and set the erange flag when nans are involved;
b) adhere to perl behaviour and return undef when nans are involved.
If b), then there's also the question of whether the erange flag should still be set.