[vtk-developers] Adding IsNan() to vtkMath
Brad King
brad.king at kitware.com
Tue Jul 21 08:16:07 EDT 2009
Moreland, Kenneth wrote:
> The source code you sent has as one of its cases a check of the bits of
> an IEEE-754 number. I see that vtkMath already has a Nan function that
> returns an IEEE NaN. If VTK is only supporting IEEE-754 in the first
> place, is there any problem with just performing the bit check?
We likely only support IEEE-754, but only by accident. New code should
be as generic as possible. Calling the native isnan() is the documented
way to perform this test in C and C++.
-Brad
More information about the vtk-developers
mailing list