|
From: peterpall <pet...@us...> - 2025-08-24 06:29:00
|
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 e6711073200495b969413b371889fb67bed8c007 (commit)
from cea93eb38e42058a968f849fc287eff469179e97 (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 e6711073200495b969413b371889fb67bed8c007
Author: Gunter Königsmann <gu...@pe...>
Date: Sun Aug 24 08:27:43 2025 +0200
wrstcse: Further improvements
- Better documentation for the changed command
- Corrected a bug that example shows and that wasn't triggered by the
test suite
- Added the correction to the test suite
diff --git a/doc/info/wrstcse.texi b/doc/info/wrstcse.texi
index 7fc865378..37d98a30e 100644
--- a/doc/info/wrstcse.texi
+++ b/doc/info/wrstcse.texi
@@ -754,22 +754,37 @@ given values.
Example:
@c ===beg===
@c load("wrstcse")$
-@c V_F: U_Diode=wc_mintypmax2tol(tol[1],.5,.75,.82);
-@c lhs(V_F)=wc_mintypmax(rhs(V_F));
+@c vals: [U_Diode=wc_mintypmax2tol(tol[1],.5,.75,.82),
+@c R=wc_mintypmax2tol(tol[2],1,1.1,1.3),
+@c U_In=wc_mintypmax2tol(tol[3],0,0,15)];
+@c wc_inputvalueranges(vals);
@c ===end===
@example maxima
(%i1) load("wrstcse")$
@group
-(%i2) V_F: U_Diode=wc_mintypmax2tol(tol[1],.5,.75,.82);
- 2
-(%o2) U_Diode = - 0.09000000000000002 tol
- 1
- + 0.15999999999999998 tol + 0.75
- 1
+(%i2) vals: [U_Diode=wc_mintypmax2tol(tol[1],.5,.75,.82),
+ R=wc_mintypmax2tol(tol[2],1,1.1,1.3),
+ U_In=wc_mintypmax2tol(tol[3],0,0,15)];
+(%o2) [U_Diode = 0.034999999999999976 (|tol | + tol )
+ | 1| 1
+ + 0.125 (tol - |tol |) + 0.75,
+ 1 | 1|
+ 2
+R = 0.04999999999999993 tol + 0.15000000000000002 tol + 1.1,
+ 2 2
+ 15 (|tol | + tol )
+ | 3| 3
+U_In = ------------------]
+ 2
@end group
@group
-(%i3) lhs(V_F)=wc_mintypmax(rhs(V_F));
-(%o3) U_Diode = [min = 0.5, typ = 0.75, max = 0.8199999999999998]
+(%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 ]
@end group
@end example
@end deffn
diff --git a/share/contrib/rtest_wrstcse.mac b/share/contrib/rtest_wrstcse.mac
index fe82aba98..122479a1e 100644
--- a/share/contrib/rtest_wrstcse.mac
+++ b/share/contrib/rtest_wrstcse.mac
@@ -1,28 +1,36 @@
(load("wrstcse"),done);
done;
-(val1:a=wc_mintypmax2tol(tol[1],a,b,c),done);
+(val1:a=wc_mintypmax2tol(tol[1],-2,1,3),done);
done;
ratsimp(subst(tol[1]=-1,rhs(val1)));
-a;
+-2;
ratsimp(subst(tol[1]=0,rhs(val1)));
-b;
+1;
ratsimp(subst(tol[1]=1,rhs(val1)));
-c;
-(val1:a=wc_mintypmax2tol(tol[1],-2,1,3),done);
+3;
+(val1:a=wc_mintypmax2tol(tol[1],-1,-1,2),done);
done;
-ratsimp(subst(tol[1]=-2,rhs(val1)));
-a;
+ratsimp(subst(tol[1]=-1,rhs(val1)));
+-1;
+ratsimp(subst(tol[1]=0,rhs(val1)));
+-1;
ratsimp(subst(tol[1]=1,rhs(val1)));
-b;
-ratsimp(subst(tol[1]=3,rhs(val1)));
-c;
-(val1:a=wc_mintypmax2tol(tol[1],-1,-1,2),done);
+2;
+(val1:a=wc_mintypmax2tol(tol[1],-1/2,0,15),done);
done;
ratsimp(subst(tol[1]=-1,rhs(val1)));
-a;
+-1/2;
+ratsimp(subst(tol[1]=0,rhs(val1)));
+0;
+ratsimp(subst(tol[1]=1,rhs(val1)));
+15;
+(val1:a=wc_mintypmax2tol(tol[1],a,b,c),done);
+done;
ratsimp(subst(tol[1]=-1,rhs(val1)));
+a;
+ratsimp(subst(tol[1]=0,rhs(val1)));
b;
-ratsimp(subst(tol[1]=2,rhs(val1)));
+ratsimp(subst(tol[1]=1,rhs(val1)));
c;
(vals:wc_tolappend([val1],[b=2+tol[1]]),done);
done;
diff --git a/share/contrib/wrstcse.mac b/share/contrib/wrstcse.mac
index dcb57c8ed..b31de01a1 100644
--- a/share/contrib/wrstcse.mac
+++ b/share/contrib/wrstcse.mac
@@ -151,7 +151,7 @@ wc_mintypmax2tol(wc_tol,wc_min,wc_typ,wc_max):=block([wc_try,wc_dff],
wc_try:
wc_typ+
(wc_tol+abs(wc_tol))/2*(wc_max-wc_typ)+
- (wc_tol-abs(wc_tol))/2*(wc_min-wc_typ),
+ (wc_tol-abs(wc_tol))/2*(wc_typ-wc_min),
return(wc_try)
);
-----------------------------------------------------------------------
Summary of changes:
doc/info/wrstcse.texi | 35 +++++++++++++++++++++++++----------
share/contrib/rtest_wrstcse.mac | 34 +++++++++++++++++++++-------------
share/contrib/wrstcse.mac | 2 +-
3 files changed, 47 insertions(+), 24 deletions(-)
hooks/post-receive
--
Maxima CAS
|