|
American-transaction costs 1.0.0.0
American option pricer under proportional transaction costs
|
#include <math.h>Go to the source code of this file.
Defines | |
| #define | EPSILON 1e-10 |
| #define | NUMWIDTH 10 |
Typedefs | |
| typedef long double | coefficient |
Functions | |
| int | equal (const coefficient x1, const coefficient x2) |
| void | fixzero (coefficient &number) |
| int | greaterequal (const coefficient x1, const coefficient x2) |
| int | greaterthan (const coefficient x1, const coefficient x2) |
| int | lessequal (const coefficient x1, const coefficient x2) |
| int | lessthan (const coefficient x1, const coefficient x2) |
Numerical conventions.
| #define EPSILON 1e-10 |
| #define NUMWIDTH 10 |
| typedef long double coefficient |
General number type.
| int equal | ( | const coefficient | x1, |
| const coefficient | x2 | ||
| ) | [inline] |
Tests whether x1 is equal to x2.
| void fixzero | ( | coefficient & | number | ) | [inline] |
Puts number equal to 0 if it is close enough to 0.
| int greaterequal | ( | const coefficient | x1, |
| const coefficient | x2 | ||
| ) | [inline] |
Tests whether x1 is greater than or equal to x2.
| int greaterthan | ( | const coefficient | x1, |
| const coefficient | x2 | ||
| ) | [inline] |
Tests whether x1 is strictly bigger than x2. Fudges it a little bit to help with numerics.
| int lessequal | ( | const coefficient | x1, |
| const coefficient | x2 | ||
| ) | [inline] |
Tests whether x1 is less than or equal to x2.
| int lessthan | ( | const coefficient | x1, |
| const coefficient | x2 | ||
| ) | [inline] |
Tests whether x1 is strictly smaller than x2. Fudges it a little bit to help with numerics.