Can you see why the code at the bottom is working as expected for integers (integral numbers) but not doubles (or other floating point numbers for that sake)? If not, don’t worry, you are not alone. (more…)
Archive for July, 2007
std::numeric_limits, does it really do what you expect?
Thursday, July 12th, 2007Predicting the future – human extinction and the probability of me finding a date tonight.
Thursday, July 12th, 2007There is a 95% chance of human extinction before 11126 AD and what is even worse, the tiny probability of 0.01% for me to find a date tonight. At least if we agree to trust Bayesian statistics. (more…)
Quick toggle between .h and .cpp files
Thursday, July 12th, 2007When programming C++ it is a very common need to switch between the .h and .cpp file. There are no built in way to do this in Visual Studio, however it is possible to accomplish! You can either use an expensive helper program, such as Visual Assist or you can do it freely by writing a macro. (more…)
Installing wordpress
Thursday, July 12th, 2007Easy peasey.