|
Boost : |
Subject: Re: [boost] [test] New location of fraction_tolerance()
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2010-05-16 17:14:37
Jeremiah Willcock <jewillco <at> osl.iu.edu> writes:
>
> There used to be a function named fraction_tolerance() in
> boost::test_tools (in <boost/test/floating_point_comparison.hpp>) that
> marked that a floating-point comparison uses a fraction as its tolerance
> value. That function seems to have disappeared in one of the recent
> checkins. What is the intended replacement? There is no
> boost::math::fpc::fraction_tolerance which is what appears from the new
> naming pattern to be the correct name. Is there an equivalent to that
> function?
>
You can use plain FPT value as fraction tolerance. You need percent_tolerance to
specify that it is different kind of tolerance.
New API is intended for use in production code. It have no dependencies on any
other Boost.Test components (including predicate_result).
You cna read more about it in my BoostCon 2010 presentation here:
http://www.filetolink.com/ca7c54ea
There should be examples available soon as well.
Gennadiy
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk