Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards


Advancing a floating-point Value by a Specific Representation Distance (ULP) float_advance

Function float_advance advances a floating-point number by a specified number of ULP.

#include <boost/math/special_functions/next.hpp>
namespace boost{ namespace math{

template <class FPT>
FPT float_advance(FPT val, int distance);

}} // namespaces
Description - float_advance

Returns a floating-point number r such that float_distance(val, r) == distance.