23 #include <lal/LALStdlib.h>
24 #include <lal/LALConstants.h>
26 #define MAX_FRACTIONAL_ERROR 1e-15
30 if(fabs(
a - b) / fabs(
a > b ?
a : b) <= fabs(max_fractional_difference))
32 return a > b ? +1 : -1;
36 #define REQUIRE_EQUAL(a, b) \
37 if(compare_within_fraction(a, b, MAX_FRACTIONAL_ERROR)) { \
38 fprintf(stderr, #a " != " #b " within %g (" #a " = %.17g, " #b " = %.17g)\n", MAX_FRACTIONAL_ERROR, a, b); \
#define REQUIRE_EQUAL(a, b)
static int compare_within_fraction(double a, double b, double max_fractional_difference)
#define LAL_2_SQRTPI
2/sqrt(pi)
#define LAL_LPL_SI
Planck length, m.
#define LAL_MPL_SI
Planck mass, kg.
#define LAL_EXPGAMMA
exp(gamma)
#define LAL_C_SI
Speed of light in vacuum, m s^-1.
#define LAL_TPL_SI
Planck time, s.
#define LAL_MSUN_SI
Nominal solar mass, kg.
#define LAL_180_PI
pi/180 is the number of radians in one degree
#define LAL_2_PI
2/pi is Buffon's constant
#define LAL_HBAR_SI
Reduced Planck constant, J s.
#define LAL_PI_180
180/pi is the number of degrees in one radian
#define LAL_PI
Archimedes's constant, pi.
#define LAL_1_PI
1/pi is the ratio of the volume of a regular octahedron to the volume of the circumscribed sphere
#define LAL_TWOPI
2*pi is circumference of a circle divided by its radius
#define LAL_MTSUN_SI
Geometrized nominal solar mass, s.
#define LAL_PI_4
pi/4 is the least positive solution to sin(x) = cos(x)
#define LAL_GAMMA
Euler-Mascheroni constant, gamma.
#define LAL_G_SI
Gravitational constant, N m^2 kg^-2.
#define LAL_SQRT2
Pythagoras's constant, sqrt(2)
#define LAL_MRSUN_SI
Geometrized nominal solar mass, m.
#define LAL_SQRT1_2
1/sqrt(2)
#define LAL_H_SI
Planck constant, J s.