cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

Ruby I

## TOL & CTOL

Sorry, what is it TOL and CTOL?

7 REPLIES 7

# CTOL (Default = .001)

This controls how closely a constraint in a solve block must be met for a solution to be acceptable. A solve block controlled by CTOL consists of the word Given, one or more constraints to be met, and an optimizing function: minimize, maximize, find, or minerr. In order for the function to return a solution, the constraints in the solve block must be satisfied. For example, a constraint such as x<2 needs to be satisfied before a solution is returned. If CTOL=.001, this constraint is satisfied if x<2.001.

Change the value of CTOL to control the precision of the solution. The larger the value of CTOL, the less precise the solution may be. For smaller values of CTOL, a more precise solution is found, but the time needed to find a solution may increase.

# TOL (Default = 0.001)

This controls the precision to which integrals and derivatives are evaluated. It also controls how long iteration in solve blocks and in the root function will go on for.

Setting TOL low

When you make TOL very low, all results are computed with much greater precision. Depending on the numerical properties of the expression this may increase computation time.

You may also see a did not find solution error message when the numerical properties of the expression are such that a solution asymptotically approaches a number that exceeds the acceptance threshold set by TOL.

Setting TOL high

High values of TOL will decrease computation time at the expense of precision.

TOL controls the accuracy of the answer of the root function. CTOL has no influence there, but it does have an influence on the result of a solve block.

Success!
Luc

## Re: TOL & CTOL

Worksheet is attached to my first answer.

What does it give in Mathcad 15?

prime

## Re: TOL & CTOL

Looks like they broke something between between Mathcad 11 and 15...

Luc

## Re: TOL & CTOL

Variables TOL and CTOL affect the operation of functions Find, (Minimize, Maximize ?) only when changing the calculation method. But we cannot do it in Prime!

Announcements
Check out the latest