@@ -279,21 +279,23 @@ wc_defaultvaluespertol:3;
279279defstruct(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