Archive for the ‘General C++’ Category

Floating-point: Bit Value of INF, NAN, DEN

September 26th, 2008 | Posted by Mason | No Comments
I have every write a post and mentioned a little bit about the binary format of IEEE 754 in Comparison of Float and Double Precision. In this post I made ...

Performance: encapsulate floating point and built-in tolerance

September 11th, 2008 | Posted by Mason | No Comments
When it comes to the floating point comparison with tolerance, two approaches come into my mind. The first approach is to write inline functions and call them when compare floating point ...

Include Guard: #pragma once vs. #ifndef #define #endif

September 6th, 2008 | Posted by Mason | 2 Comments
In the C and C++ programming languages, an include guard, sometimes called a macro guard, is a particular construct used to avoid the problem of double inclusion when dealing with ...