The NAN macro isn't defined on all platforms and we have various workarounds scattered here and there. Is it reasonable to determine a suitable value of NAN for the various float types as part of the initial setup and configuration and have the results appended to one of the include files? This shouldn't be difficult for the gnu compilers, but might be a hassle for MSVC and some of the others. It can be hardwired into MSVC if we assume the Intel architecture.