isfinite is only available in C++ 11 :(
What are the problematic cases ? NaN ? (inf should be fine)