Original Post
I'm programming some general purpose 2D math stuff and I have a Line class. One of the methods in that class returns the slope of the line. If a line is vertical, it will have a slope of infinity. Is there any reliable way to return a NaN or Inf value from a function without the possibility of raising an exception or other run-time error? Since I've heard that generating a NaN/Inf is very implementation specific, you'll probably want to know I'm presently coding in Visual C++ Express but I will soon have to port the code to GCC for Linux. -Auron