#include <cfloat>
Go to the source code of this file.
Classes | |
class | CompareDoubles |
Functions | |
double | SmallPow (double x, unsigned exponent) |
bool | Divides (double smallerNumber, double largerNumber) |
This file contains some utility functions and a small class for dealing with floating point numbers.
Definition in file MathsCustomFunctions.hpp.
Uses fmod to determine if smallerNumber divides the largerNumber. We expect smallerNumber/largerNumber <= 1 and therefore fmod(largerNumber,smallerNumber) should be close to zero or close to smallerNumber.
smallerNumber | the smaller | |
largerNumber | the larger |
Definition at line 71 of file MathsCustomFunctions.cpp.
Replacement "pow" function.
x | number to be raised to a small power | |
exponent | small integer exponent |
Definition at line 34 of file MathsCustomFunctions.cpp.