/* * fast_functions.hpp * * Created on: Apr 1, 2010 * Author: crueger */ #ifndef FAST_FUNCTIONS_HPP_ #define FAST_FUNCTIONS_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include "LinearAlgebra/defs.hpp" /** * !@file * This file contains several functions that need to be very fast and which are inlined for this * reason. * * Warning: do not forget inline keyword for functions in this file to avoid multiple definitions! */ typedef enum { Minus = -1, Zero = 0, Plus = +1 } sign_t; /********************************* Functions ************************************************/ /** Gives numerical sign of some \a value. * * @param value to check * @return enumerated sign_t of value */ inline sign_t sign(double value) { if(fabs(value)