#include <stdio.h>
#include <math.h>
Go to the source code of this file.
Functions | |
double | f (double x) |
The function in which we search for a root. | |
int | sameSign (double x, double y) |
Return whether x and y have the same sign. | |
double | middleOf (double x, double y) |
Return the mid point in between x and y. | |
int | isSmallNumber (double x) |
Is x considered to be very close to 0.0. | |
double | findRootBetween (double l, double u) |
Search for a root of the continuous function f between the parameters l and u. | |
int | main (void) |
A sample interactive driver of the root searching for f. |
double f | ( | double | x | ) |
The function in which we search for a root.
[in] | x | The input to the function f. |
Definition at line 12 of file root-c-doc-1-doxy.c.
double findRootBetween | ( | double | l, | |
double | u | |||
) |
Search for a root of the continuous function f between the parameters l and u.
A root is a double r for which f(r) is very close to 0.0.
[in] | l | The lower limit of the interval in which to search for a root. |
[in] | u | The upper limit of the interval in which to search for a root. |
Definition at line 45 of file root-c-doc-1-doxy.c.
int isSmallNumber | ( | double | x | ) |
Is x considered to be very close to 0.0.
[in] | x | The input to be evaluated. |
Definition at line 35 of file root-c-doc-1-doxy.c.
int main | ( | void | ) |
A sample interactive driver of the root searching for f.
Definition at line 56 of file root-c-doc-1-doxy.c.
double middleOf | ( | double | x, | |
double | y | |||
) |
Return the mid point in between x and y.
[in] | x | The first double. |
[in] | y | The second double. |
Definition at line 28 of file root-c-doc-1-doxy.c.
int sameSign | ( | double | x, | |
double | y | |||
) |
Return whether x and y have the same sign.
[in] | x | The first double the sign of which is to be compared with y. |
[in] | y | The second double the sign of which is to be compared with x. |
Definition at line 21 of file root-c-doc-1-doxy.c.