|
From: peterpall <pet...@us...> - 2025-08-31 10:25:42
|
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 1a1a308b448e8d27064c149770ff66394fcee53a (commit)
via a9dfa27159f4bcb9e4aa04e6e53557fb53bb83f6 (commit)
from d0a6c82f5a9a09f6e50f3f02b2c3418923d12b29 (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 1a1a308b448e8d27064c149770ff66394fcee53a
Merge: d0a6c82f5 a9dfa2715
Author: Gunter Königsmann <gu...@pe...>
Date: Sun Aug 31 12:25:18 2025 +0200
Merge branch 'feature/koengu/wrstcseEWCsamples'
commit a9dfa27159f4bcb9e4aa04e6e53557fb53bb83f6
Author: Gunter Königsmann <gu...@pe...>
Date: Sun Aug 31 12:24:50 2025 +0200
wrstcse: Made the defailt EWC depth configurable
diff --git a/doc/info/wrstcse.texi b/doc/info/wrstcse.texi
index fb62aceab..e085031c8 100644
--- a/doc/info/wrstcse.texi
+++ b/doc/info/wrstcse.texi
@@ -194,8 +194,9 @@ Example:
Systematically introduces @var{num} values per parameter into @var{expression}
and returns a list of the result. If no @var{num} is given, @var{num} defaults
-to 3. Negative values for @var{num} make @code{wc_systematic} use the
-monte carlo method, instead.
+to @var{wc_defaultvaluespertol}. Negative values for @var{num} make
+@code{wc_systematic} use the monte carlo method with @var{num} samples,
+instead.
If an equation uses the following values with tolerances:
@@ -209,7 +210,9 @@ If an equation uses the following values with tolerances:
be tested, instead:
@figure{wrstcse_montecarlo}
-See also @mref{wc_mintypmax} @mref{wc_ewc_simplify} and @mrefdot{wc_montecarlo}
+See also @mrefcomma{wc_defaultvaluespertol} @mrefcomma{wc_mintypmax}
+@mrefcomma{wc_defaultvaluespertol}
+@mref{wc_ewc_simplify} and @mrefdot{wc_montecarlo}
Example:
@c ===beg===
@@ -408,7 +411,7 @@ Example:
Prints the minimum, maximum and typical value of @var{expr}. If @var{n}
is positive, @var{n} values for each parameter will be tried systematically.
If @var{n} is negative, @var{-n} random values are used instead.
-If no @var{n} is given, 3 is assumed.
+If no @var{n} is given, @var{wc_defaultvaluespertol} is assumed.
See also @mrefcomma{wc_mintypmax_percent} @mrefcomma{wc_mintypmax_rss}
@mref{wc_ewc_simplify} and @mrefdot{wc_systematic}
@@ -707,6 +710,80 @@ Example:
@end example
@end defvr
+@anchor{wc_defaultvaluespertol}
+@defvr {Option variable} wc_defaultvaluespertol
+Default value: @code{3}
+
+Defines how many samples per @var{tol[n]} the EWC method of
+@code{wc_systematic} and @code{wc_mintypmax} shall use by default.
+
+See also @mref{wc_systematic} and @mrefdot{wc_mintypmax}
+
+Example:
+@c ===beg===
+@c load("wrstcse")$
+@c ratprint:false$
+@c vals: [
+@c R_1= 100.0*(1+tol[1]*.01),
+@c R_2= 1000.0*(1+tol[2]*.01)
+@c ];
+@c wc_defaultvaluespertol:2$
+@c wc_systematic(vals);
+@c wc_defaultvaluespertol:3$
+@c wc_systematic(vals);
+@c wc_defaultvaluespertol:5$
+@c wc_systematic(vals);
+@c ===end===
+@example maxima
+(%i1) load("wrstcse")$
+(%i2) ratprint:false$
+@group
+(%i3) vals: [
+ R_1= 100.0*(1+tol[1]*.01),
+ R_2= 1000.0*(1+tol[2]*.01)
+ ];
+(%o3) [R_1 = 100.0 (0.01 tol + 1), R_2 = 1000.0 (0.01 tol + 1)]
+ 1 2
+@end group
+(%i4) wc_defaultvaluespertol:2$
+@group
+(%i5) wc_systematic(vals);
+(%o5) [[R_1 = 99.0, R_2 = 990.0], [R_1 = 99.0, R_2 = 1010.0],
+ [R_1 = 101.0, R_2 = 990.0], [R_1 = 101.0, R_2 = 1010.0]]
+@end group
+(%i6) wc_defaultvaluespertol:3$
+@group
+(%i7) wc_systematic(vals);
+(%o7) [[R_1 = 99.0, R_2 = 990.0], [R_1 = 99.0, R_2 = 1000.0],
+[R_1 = 99.0, R_2 = 1010.0], [R_1 = 100.0, R_2 = 990.0],
+[R_1 = 100.0, R_2 = 1000.0], [R_1 = 100.0, R_2 = 1010.0],
+[R_1 = 101.0, R_2 = 990.0], [R_1 = 101.0, R_2 = 1000.0],
+[R_1 = 101.0, R_2 = 1010.0]]
+@end group
+(%i8) wc_defaultvaluespertol:5$
+@group
+(%i9) wc_systematic(vals);
+(%o9) [[R_1 = 99.0, R_2 = 990.0], [R_1 = 99.0, R_2 = 995.0],
+[R_1 = 99.0, R_2 = 1000.0], [R_1 = 99.0,
+R_2 = 1004.9999999999999], [R_1 = 99.0, R_2 = 1010.0],
+[R_1 = 99.5, R_2 = 990.0], [R_1 = 99.5, R_2 = 995.0],
+[R_1 = 99.5, R_2 = 1000.0], [R_1 = 99.5,
+R_2 = 1004.9999999999999], [R_1 = 99.5, R_2 = 1010.0],
+[R_1 = 100.0, R_2 = 990.0], [R_1 = 100.0, R_2 = 995.0],
+[R_1 = 100.0, R_2 = 1000.0], [R_1 = 100.0,
+R_2 = 1004.9999999999999], [R_1 = 100.0, R_2 = 1010.0],
+[R_1 = 100.49999999999999, R_2 = 990.0],
+[R_1 = 100.49999999999999, R_2 = 995.0],
+[R_1 = 100.49999999999999, R_2 = 1000.0],
+[R_1 = 100.49999999999999, R_2 = 1004.9999999999999],
+[R_1 = 100.49999999999999, R_2 = 1010.0],
+[R_1 = 101.0, R_2 = 990.0], [R_1 = 101.0, R_2 = 995.0],
+[R_1 = 101.0, R_2 = 1000.0], [R_1 = 101.0,
+R_2 = 1004.9999999999999], [R_1 = 101.0, R_2 = 1010.0]]
+@end group
+@end example
+@end defvr
+
@anchor{wc_tolappend}
@deffn {Function} wc_tolappend (@var{list})
diff --git a/share/contrib/wrstcse.mac b/share/contrib/wrstcse.mac
index 162b6cb03..1962d2e57 100644
--- a/share/contrib/wrstcse.mac
+++ b/share/contrib/wrstcse.mac
@@ -54,7 +54,7 @@ wc_systematic(wc_x,[wc_valuespertol]):=block(
wc_numoftols:length(%wc_tols),
/* Default the number of values per tolerance parameter to 3 */
- if wc_valuespertol=[] then wc_valuespertol:3 else wc_valuespertol:first(wc_valuespertol),
+ if wc_valuespertol=[] then wc_valuespertol:wc_defaultvaluespertol else wc_valuespertol:first(wc_valuespertol),
makelist(
(
subst(
@@ -113,7 +113,7 @@ wc_typicalvalues(wc_x):=
wc_mintypmax(wc_x,[wc_params]):=block([wc_allvalues,wc_param1,min,wc_typ,max],
if length(wc_params) < 1 then
- wc_param1:3
+ wc_param1:wc_defaultvaluespertol
else
wc_param1:inpart(wc_params,1),
@@ -168,6 +168,8 @@ wc_mintypmax2tol(wc_tol,wc_min,wc_typ,wc_max):=block([wc_try,wc_dff],
/* How many sigmas the range of tol[x]=-1...1 is assumed to be wide */
wc_defaultsigma:6;
+/* How many samples per tol we want the EWC method to use by default */
+wc_defaultvaluespertol:3;
defstruct(wc_rssparams(sigma,mu));
/* Determines the rss parameters of the tolerance of x */
-----------------------------------------------------------------------
Summary of changes:
doc/info/wrstcse.texi | 85 ++++++++++++++++++++++++++++++++++++++++++++---
share/contrib/wrstcse.mac | 6 ++--
2 files changed, 85 insertions(+), 6 deletions(-)
hooks/post-receive
--
Maxima CAS
|