possible to just return `double` as `nan` is a floating point value anyway?