OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
Algorithms
bet
math
root.h
Go to the documentation of this file.
1
/* root.h
2
root finding functions
3
4
Project: Beam Envelope Tracker (BET)
5
6
Revision history
7
Date Description Programmer
8
------------ -------------------------------------------- --------------
9
09-03-06 Created Rene Bakker
10
11
Last Revision:
12
$Id: root.h 29 2007-04-14 17:03:18Z l_bakker $
13
*/
14
15
16
#ifndef _ROOT_DEF
17
#define _ROOT_DEF
18
19
/* findRoot()
20
Originally rtsafe()
21
Using a combination of Newton-Raphson and bisection, find the root of a
22
function bracketed between x1 and x2. The root, returned as the function
23
value rtsafe, will be refined until its accuracy is known within ±xacc.
24
funcd is a user-supplied routine that returns both the function value
25
and the first derivative of the function. */
26
double
findRoot
27
(
28
void
(*funcd)(
double
,
double
*,
double
*),
// function to find root
29
double
,
double
,
// boundaries
30
double
);
// accuracy
31
32
#endif
findRoot
double findRoot(void(*funcd)(double, double *, double *), double x1, double x2, double xacc)
Definition:
root.cpp:35
Generated on Sat Jan 4 2020 14:47:43 for OPAL (Object Oriented Parallel Accelerator Library) by
1.8.5