HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Contains macros for common mathematical functions. More...
#include <math.h>
Go to the source code of this file.
Macros | |
#define | min(a, b) ((a)<(b)?(a):(b)) |
#define | max(a, b) ((a)>(b)?(a):(b)) |
#define | min3(a, b, c) min(min((a),(b)),min((b),(c))) |
#define | max3(a, b, c) max(max((a),(b)),max((b),(c))) |
#define | absolute(a) ((a)<0?-(a):(a)) |
#define | raiseto(x, a) (exp((a)*log(x))) |
#define | raiseto_int(y, x, a) |
#define | sign(a) ((a)<0?-1.0:1.0) |
Contains macros for common mathematical functions.
Definition in file math_ops.h.
#define min | ( | a, | |
b | |||
) | ((a)<(b)?(a):(b)) |
Minimum of two numbers
Definition at line 14 of file math_ops.h.
#define max | ( | a, | |
b | |||
) | ((a)>(b)?(a):(b)) |
Maximum of two numbers
Definition at line 18 of file math_ops.h.
Minimum of three numbers
Definition at line 23 of file math_ops.h.
Maximum of three numbers
Definition at line 27 of file math_ops.h.
#define absolute | ( | a | ) | ((a)<0?-(a):(a)) |
Absolute value
Definition at line 32 of file math_ops.h.
#define raiseto | ( | x, | |
a | |||
) | (exp((a)*log(x))) |
Raise to a power: y = x^a
Definition at line 37 of file math_ops.h.
#define raiseto_int | ( | y, | |
x, | |||
a | |||
) |
Raise to a power (int only): y = x^a
Definition at line 42 of file math_ops.h.
#define sign | ( | a | ) | ((a)<0?-1.0:1.0) |
Returns the sign of the argument
Definition at line 54 of file math_ops.h.