by inetknght · 3y ago · 0 comments
An exception would be better. Then you immediately get at the first problem instead of having to track down the lifetime of the observed problem to find the first problem.
It depends on the context. Sometimes NaNs are expected and to be ignored. Sometimes they signal a problem.