|
From: peterpall <pet...@us...> - 2025-09-11 15:52:06
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Maxima CAS".
The branch, master has been updated
via 7d78aa96b227bdd2e6526566e8e6c53c6a6bbdc1 (commit)
from 3a9a37f764757dddbc0028f6abde43631f80be9e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7d78aa96b227bdd2e6526566e8e6c53c6a6bbdc1
Author: Gunter Königsmann <gu...@pe...>
Date: Thu Sep 11 17:51:38 2025 +0200
wrstcase: Better support for assymetrical tolerances
Now that everything supports assymetrical tolerances we can drop
the approach of approximating by a quadratic equation.
diff --git a/doc/info/wrstcse.texi b/doc/info/wrstcse.texi
index a156d2949..2b83956b1 100644
--- a/doc/info/wrstcse.texi
+++ b/doc/info/wrstcse.texi
@@ -594,8 +594,8 @@ this only happens in a neglectible number of cases. But it will yield only
the correct results if the gaussian distribution of the input data is known.
Due to its nature this method doesn't support tolerances that aren't
-symmetrical, and therefore has only poor support for non-linear
-dependencies of @code{expr} from @var{tol[n]}.
+symmetrical. Therefore in that case the tolerances are extended in the
+direction that is less wide.
See also @mref{wc_defaultsigma} @mrefcomma{wc_mintypmax_rss_percent} and
@mrefdot{wc_mintypmax}
@@ -945,9 +945,10 @@ Example:
| 1| 1
+ 0.125 (tol - |tol |) + 0.75,
1 | 1|
- 2
-R = 0.04999999999999993 tol + 0.15000000000000002 tol + 1.1,
- 2 2
+R = 0.09999999999999998 (|tol | + tol )
+ | 2| 2
+ + 0.050000000000000044 (tol - |tol |) + 1.1,
+ 2 | 2|
15 (|tol | + tol )
| 3| 3
U_In = ------------------]
@@ -955,12 +956,11 @@ U_In = ------------------]
@end group
@group
(%i3) wc_inputvalueranges(vals);
-(%o3)
- [ U_Diode min = 0.5 typ = 0.75 max = 0.82 ]
- [ ]
- [ R min = 1.0 typ = 1.1 max = 1.2999999999999998 ]
- [ ]
- [ U_In min = 0 typ = 0 max = 15 ]
+ [ U_Diode min = 0.5 typ = 0.75 max = 0.82 ]
+ [ ]
+(%o3) [ R min = 1.0 typ = 1.1 max = 1.3 ]
+ [ ]
+ [ U_In min = 0 typ = 0 max = 15 ]
@end group
@end example
@end deffn
diff --git a/share/contrib/wrstcse.mac b/share/contrib/wrstcse.mac
index 7b9d65cb5..4932aedbb 100644
--- a/share/contrib/wrstcse.mac
+++ b/share/contrib/wrstcse.mac
@@ -184,19 +184,20 @@ wc_inputvalueassumptions(wc_x):=block([wc_line,wc_assumptions:[]],
);
/* A function that generates an equation out of the min, typ and maximum value for an element */
-wc_mintypmax2tol(wc_tol,wc_min,wc_typ,wc_max):=block([wc_try,wc_dff],
+wc_mintypmax2tol(wc_tol,wc_min,wc_typ,wc_max):=block([wc_try],
if wc_min>wc_typ then warning("wc_mintypmax2tol: Min value bigger than typ value"),
if wc_typ>wc_max then warning("wc_mintypmax2tol: Max value smaller than typ value"),
- /* Try to find a quadratic equation that hits all three points */
- wc_try:((-2*wc_typ+wc_min+wc_max)*wc_tol^2)/2-((wc_min-wc_max)*wc_tol)/2+wc_typ,wc_tol,
- /* Let's see if the quadratic equation overswings the targets */
- wc_dff:diff(wc_try,wc_tol),
- if (subst (wc_tol=-1,wc_dff)<0) or (subst (wc_tol=0,wc_dff)<0) or (subst (wc_tol=1,wc_dff)<0) then
- wc_try:
+ /* Try to find a linear equation that hits all three points */
+ wc_try:wc_typ+(wc_max-wc_typ)*wc_tol,
+ /* Let's see if the quadratic equation hitss the targets */
+ if subst (wc_tol=-1,wc_try) = wc_min then
+ return(wc_try)
+ else
+ return(
wc_typ+
(wc_tol+abs(wc_tol))/2*(wc_max-wc_typ)+
- (wc_tol-abs(wc_tol))/2*(wc_typ-wc_min),
- return(wc_try)
+ (wc_tol-abs(wc_tol))/2*(wc_typ-wc_min)
+ )
);
/* How many sigmas the range of tol[x]=-1...1 is assumed to be wide */
-----------------------------------------------------------------------
Summary of changes:
doc/info/wrstcse.texi | 22 +++++++++++-----------
share/contrib/wrstcse.mac | 19 ++++++++++---------
2 files changed, 21 insertions(+), 20 deletions(-)
hooks/post-receive
--
Maxima CAS
|