lines 7-67 of file: example/multi_thread/multi_chkpoint_one.cpp

{xrst_begin multi_chkpoint_one_algo app}
{xrst_spell
   iterate
}

chkpoint_one Algorithm that Computes Square Root
################################################

Syntax
******
*checkpoint_algo* ( *au* , *ay* )

Purpose
*******
This algorithm computes a square root using Newton's method.
It is meant to be very inefficient in order to demonstrate timing results.

au
**
This argument has prototype

   ``const`` *ADvector* & *au*

where *ADvector* is a
:ref:`simple vector class<SimpleVector-name>` with elements
of type ``AD<double>`` .
The size of *au* is three.

y_initial
=========
We use the notation

   *y_initial* = *au* [0]

for the initial value of the Newton iterate.

y_squared
=========
We use the notation

   *y_squared* = *au* [1]

for the value we are taking the square root of.

ay
**
This argument has prototype

   *ADvector* & *ay*

The size of *ay* is one and
*ay* [0] is the square root of *y_squared* .

Source
******
{xrst_literal
   // BEGIN ALGO C++
   // END ALGO C++
}

{xrst_end multi_chkpoint_one_algo}
