From 2d91035404884089d1faf038300e437963e0c2a4 Mon Sep 17 00:00:00 2001 From: Pfiffikus <2845742+Pfiffikus@users.noreply.github.com> Date: Thu, 26 Oct 2017 09:48:44 +0200 Subject: [PATCH] Update assertions.md scale more detailed explained; have to be adapted to PR #1068 if necessary --- docs/assertions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/assertions.md b/docs/assertions.md index 02b4de98..f5df0c97 100644 --- a/docs/assertions.md +++ b/docs/assertions.md @@ -57,7 +57,7 @@ This way `Approx` is constructed with reasonable defaults, covering most simple * __epsilon__ - epsilon serves to set the percentage by which a result can be erroneous, before it is rejected. By default set to `std::numeric_limits::epsilon()*100`. * __margin__ - margin serves to set the the absolute value by which a result can be erroneous before it is rejected. By default set to `0.0`. -* __scale__ - scale serves to adjust the base for comparison used by epsilon, can be used when By default set to `1.0`. +* __scale__ - scale serves to adjust the base for comparison used by epsilon. By default set to `1.0`. #### epsilon example ```cpp @@ -77,7 +77,7 @@ Approx target = Approx(100).margin(5); ``` #### scale -Scale can be useful if the computation leading to the result worked on different scale, than is used by the results (and thus expected errors are on a different scale than would be expected based on the results alone). +Scale can be useful if the computation leading to the result worked on different scale, than is used by the results (and thus expected errors are on a different scale than would be expected based on the results alone), i.e. an additional not scaling difference will be accepted, because | current - target | < eps_rel + eps_abs (while eps_rel = max(current, target) * epsilon, eps_abs = epsilon * scale) will be checked. ## Exceptions @@ -138,4 +138,4 @@ For more details, along with workarounds, see the section on [the limitations pa --- -[Home](Readme.md) \ No newline at end of file +[Home](Readme.md)