Skip to content

Commit 1b8abcf

Browse files
gunterkoenigsmannrtoy
authored andcommitted
wrstcse: For the rss methods if a diff() was ind we got a variable name instead of a value
1 parent 69ea13e commit 1b8abcf

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

share/contrib/wrstcse.mac

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,21 +279,23 @@ wc_defaultvaluespertol:3;
279279
defstruct(wc_rssparams(sigma,mu));
280280

281281
/* Determines the rss parameters of the tolerance of x */
282-
wc_getrssparams(x):=block([tols:[],derivates_linearized,derivates,sigmaval,meanval],
282+
wc_getrssparams(x):=block([tols:[],derivates_linearized,derivates,sigmaval,meanval,diffofwctol],
283283
/* Compile a list of tolerances */
284284
for i in listofvars(x) do
285285
if not(freeof('tol,i)) then
286286
push(i,tols),
287287
/* Create the mean value */
288288
meanval:wc_typicalvalues(x),
289289
/* Create a list of derivatives, linearized over the point that all tol[x] are 0.*/
290-
derivates:makelist(block([derivate:limit(%wc_typicalvalues(diff(x,i),i),i,0)],
290+
derivates:makelist(block(
291+
[diffofwctol:%wc_typicalvalues(diff(x,i),i),derivate],
292+
derivate:limit(diffofwctol,i,0),
291293
if derivate='ind then block([wc_poslimit,wc_neglimit],
292294
/* We have two derivates. As we are performing a worst case
293295
calculation we make a worst-case assumption and use the bigger
294296
one ignoring its sign */
295-
wc_poslimit:limit(wc_diffofwctol,wc_tol,0,'plus),
296-
wc_neglimit:limit(wc_diffofwctol,wc_tol,0,'minus),
297+
wc_poslimit:limit(diffofwctol,i,0,'plus),
298+
wc_neglimit:limit(diffofwctol,i,0,'minus),
297299
derivate:max(abs(wc_poslimit),abs(wc_neglimit)),
298300
/* If we can determine which of the limits is bigger we can
299301
do without the abs() */

0 commit comments

Comments
 (0)