|
From: Dirk S. <val...@ds...> - 2008-05-06 15:10:19
|
Hello, > As i don't need 80bit precision, I guess i'll get by with > some appropriate floating point tricks such as addin small > values and rounding.... If you want to write portable applications this is anyway required. Many floating point using applications fail mysteriously, when compiled with different compiler options, on different systems and so on, when you do not care for such things. Usually it is better to have an "if(fabs(a-b) < epsilon)" compared to an "if(a == b)". This will save you a lot of debugging trouble later on. Always remember that floating point is an approximation when writing value tests. Ciao -- http://www.dstoecker.eu/ (PGP key available) |