Rorschach
10-27-2009, 05:41 PM
I have a problem where a complex algorythm is occasionally returning #IND (indeterminate) values. I've traced it back to a raytracer function supplying and .#INF (infinite) value which, when fed into other functions returns the #IND value.
As to why the raytracer occasioanally does this (I've seen it with the various ray tracing implementations), I don't know, but I've got a feeling it's buggy.
What I do want to know is whether there is a test for these values. At the moment I convert them to string and do a test =="1.#INF", but that seems clumsy and possibly slow when dealing with thousands of values.
I guess I'm looking for something like isNumber, isFloat, isInt, isFinite, isValidNumber? etc....
Thanks
As to why the raytracer occasioanally does this (I've seen it with the various ray tracing implementations), I don't know, but I've got a feeling it's buggy.
What I do want to know is whether there is a test for these values. At the moment I convert them to string and do a test =="1.#INF", but that seems clumsy and possibly slow when dealing with thousands of values.
I guess I'm looking for something like isNumber, isFloat, isInt, isFinite, isValidNumber? etc....
Thanks
