From: Owens N. L C. AFRL/I. <Nic...@rl...> - 2005-08-18 16:54:15
|
Hello All: I am working on a program that involves finding the tangent lines between 2 ellipses, and the intersection points. I am using the vgl and vnl libraries to do these calculations, but occasionally they fail due to floating point "inexactness." Some of the checks for equality fail because 1e-300 != 0 (or something similar, where the difference between the two sides is really small). I could not figure out a search term to figure out if this problem had been brought up before in the forums, or the mailing list, so I'm wondering if it has been brought up before, and if so, if it has been addressed. One thing I have tried to do is to create another class (called mydpfp) which emulates a double, but uses abs(A-B) < 1e-4 to see if A and B are equal, and I'm having trouble getting it to compile: /home/owensn/src/vxl-1.1.0/core/vgl/vgl_conic.txx: In constructor `vgl_conic<T>::vgl_conic(const vgl_homg_point_2d<Type>&, T, T, T) [with T = mydpfp]': t2.cc:16: instantiated from here /home/owensn/src/vxl-1.1.0/core/vgl/vgl_conic.txx:119: error: operands to ?: have different types /home/owensn/src/vxl-1.1.0/core/vgl/vgl_conic.txx:120: error: operands to ?: have different types Any help with either problem would be great. Also, I just realized that 1.2 is available, I'm going to try that while I wait (patiently :^) for an answer. Thanks Greatly, Nick Owens |