Go to the source code of this file.
Macros | |
Floating-point constants | |
The following constants define the precision and range of floating-point arithmetic in LAL. They are taken from the IEEE standard 754 for binary arithmetic. All numbers are dimensionless. | |
#define | LAL_REAL4_MANT 24 |
Bits of precision in the mantissa of a REAL4. More... | |
#define | LAL_REAL4_MAX 0x1.fffffe0000000p+127 |
Largest normalized REAL4 number (2-2^-23)*2^127. More... | |
#define | LAL_REAL4_MIN 0x1.0000000000000p-126 |
Smallest normalized REAL4 number 2^-126. More... | |
#define | LAL_REAL4_EPS 0x1.0000000000000p-23 |
Difference between 1 and the next resolvable REAL4 2^-23. More... | |
#define | LAL_REAL8_MANT 53 |
Bits of precision in the mantissa of a REAL8. More... | |
#define | LAL_REAL8_MAX 0x1.fffffffffffffp+1023 |
Largest normalized REAL8 number (2-2^-52)*2^1023. More... | |
#define | LAL_REAL8_MIN 0x1.0000000000000p-1022 |
Smallest normalized REAL8 number 2^-1022. More... | |
#define | LAL_REAL8_EPS 0x1.0000000000000p-52 |
Difference between 1 and the next resolvable REAL8 2^-52. More... | |
Integer constants | |
Extremal integer values, all expressed as unsigned long long. | |
#define | LAL_UINT8_MAX LAL_UINT8_C(18446744073709551615) |
#define | LAL_UINT4_MAX LAL_UINT8_C(4294967295) |
#define | LAL_UINT2_MAX LAL_UINT8_C(65535) |
#define | LAL_INT8_MAX LAL_UINT8_C(9223372036854775807) |
#define | LAL_INT4_MAX LAL_UINT8_C(2147483647) |
#define | LAL_INT2_MAX LAL_UINT8_C(32767) |
Mathematical constants | |
All are dimensionless. | |
#define | LAL_E 2.718281828459045235360287471352662498 |
Euler's constant, e. More... | |
#define | LAL_LOG2E 1.442695040888963407359924681001892137 |
base-2 logarithm of e, log_2(e) More... | |
#define | LAL_LOG10E 0.434294481903251827651128918916605082 |
common logarithm of e, log_10(e) More... | |
#define | LAL_LN2 0.693147180559945309417232121458176568 |
natural log of 2, ln(2) More... | |
#define | LAL_LN10 2.302585092994045684017991454684364208 |
natural log of 10, ln(10) More... | |
#define | LAL_SQRT2 1.414213562373095048801688724209698079 |
Pythagoras's constant, sqrt(2) More... | |
#define | LAL_SQRT1_2 0.707106781186547524400844362104849039 |
1/sqrt(2) More... | |
#define | LAL_GAMMA 0.577215664901532860606512090082402431 |
Euler-Mascheroni constant, gamma. More... | |
#define | LAL_EXPGAMMA 1.781072417990197985236504103107179549 |
exp(gamma) More... | |
#define | LAL_PI 3.141592653589793238462643383279502884 |
Archimedes's constant, pi. More... | |
#define | LAL_TWOPI 6.283185307179586476925286766559005768 |
2*pi is circumference of a circle divided by its radius More... | |
#define | LAL_PI_2 1.570796326794896619231321691639751442 |
pi/2 More... | |
#define | LAL_PI_4 0.785398163397448309615660845819875721 |
pi/4 is the least positive solution to sin(x) = cos(x) More... | |
#define | LAL_1_PI 0.318309886183790671537767526745028724 |
1/pi is the ratio of the volume of a regular octahedron to the volume of the circumscribed sphere More... | |
#define | LAL_2_PI 0.636619772367581343075535053490057448 |
2/pi is Buffon's constant More... | |
#define | LAL_2_SQRTPI 1.128379167095512573896158903121545172 |
2/sqrt(pi) More... | |
#define | LAL_PI_180 1.745329251994329576923690768488612713e-2 |
180/pi is the number of degrees in one radian More... | |
#define | LAL_180_PI 57.295779513082320876798154814105170332 |
pi/180 is the number of radians in one degree More... | |
#define | LAL_LNPI 1.144729885849400174143427351353058712 |
natural log of pi, ln(pi) More... | |
Exact physical constants | |
The following physical constants are defined to have exact values. The dimensions in SI units are as shown.
| |
#define | LAL_C_SI 299792458e0 |
Speed of light in vacuum, m s^-1. More... | |
#define | LAL_H_SI 6.62607015e-34 |
Planck constant, J s. More... | |
#define | LAL_QE_SI 1.602176634e-19 |
Electron charge, C. More... | |
#define | LAL_MOL 6.02214076e+23 |
Avogadro constant, dimensionless. More... | |
#define | LAL_K_SI 1.380649e-23 |
Boltzmann constant, J K^-1. More... | |
#define | LAL_GEARTH_SI 9.80665 |
Standard gravity, m s^-2. More... | |
#define | LAL_PATM_SI 101325e0 |
Standard atmosphere, Pa. More... | |
#define | LAL_HBAR_SI 1.054571817646156391262428003302280745e-34 |
Reduced Planck constant, J s. More... | |
#define | LAL_R_SI 8.31446261815324 |
Molar gas constant, J mol^-1 K^-1. More... | |
#define | LAL_SIGMA_SI 5.670374419184429453970996731889230876e-8 |
Stefan-Boltzmann constant, W m^-2 K^-4. More... | |
#define | LAL_C2RAD_SI 1.438776877503933802146671601543911595e-2 |
Second radiation constant, m K. More... | |
#define | LAL_BWIEN_SI 2.897771955185172661478605448092884727e-3 |
Wien displacement law constant, m K. More... | |
Primary physical constants | |
These physical constants are given to the precision to which they are known. Other physical constants derived from these are given in the next section.
| |
#define | LAL_ALPHA 0.0072973525693 |
Fine structure constant, dimensionless. More... | |
#define | LAL_RYD_SI 10973731.568160 |
Rydberg constant, m^-1. More... | |
#define | LAL_MP_ME 1836.15267343 |
Proton-electron mass ratio, dimensionless. More... | |
#define | LAL_ME_AMU 0.000548579909065 |
Electron mass, atomic mass units. More... | |
#define | LAL_G_SI 6.67430e-11 |
Gravitational constant, N m^2 kg^-2. More... | |
Derived physical constants | |
The following constants are derived from the primary physical constants. When not dimensionless, they are given in the SI units shown. Precision beyond the accuracy is retained for these constants in order that equivalent combinations yield the same value. | |
#define | LAL_MU0_SI 1.256637062123837330602573817851770477e-6 |
Permeability of free space, N A^-2. More... | |
#define | LAL_EPSILON0_SI 8.854187812773347391812964575762341677e-12 |
Permittivity of free space, C^2 N^-1 m^-2. More... | |
#define | LAL_MPL_SI 2.176434342717898213927914919024147041e-8 |
Planck mass, kg. More... | |
#define | LAL_LPL_SI 1.616255024423705286500047697249314157e-35 |
Planck length, m. More... | |
#define | LAL_TPL_SI 5.391246448313603961644851309932934193e-44 |
Planck time, s. More... | |
#define | LAL_LUMPL_SI 3.628254904411280064474144638555430509e52 |
Planck luminosity, J s^-1. More... | |
#define | LAL_MP_AMU 1.00727646661968604164295 |
Proton mass, atomic mass units. More... | |
#define | LAL_ME_SI 9.109383701517728819842163772087735080e-31 |
Electron mass, kg. More... | |
#define | LAL_MP_SI 1.672621923684144692109494784075478798e-27 |
Proton mass, kg. More... | |
#define | LAL_AMU_SI 1.660539066595378801332508797951914123e-27 |
Atomic mass unit, kg. More... | |
#define | LAL_AB_SI 5.291772109034624983506063293620795401e-11 |
Bohr radius, m. More... | |
#define | LAL_LAMBDAE_SI 2.426310238678370231942278247906312873e-12 |
Electron Compton wavelength, m. More... | |
#define | LAL_RE_SI 2.817940326207927528347087481623789683e-15 |
Classical electron radius, m. More... | |
#define | LAL_MUB_SI 9.274010078344114556082608495144137435e-24 |
Bohr magneton, J T^-1. More... | |
#define | LAL_MUN_SI 5.050783746114056140501321131006282803e-27 |
Nuclear magneton, J T^-1. More... | |
Exact astrophysical parameters | |
The following astrophysical constants are defined to have exact values. The dimensions in SI units are as shown. | |
#define | LAL_ROT_DAY 1.00273781191135448 |
Number of Earth rotations in one UT1 day, dimensionless. More... | |
#define | LAL_DAYJUL_SI 86400e0 |
Julian day, s. More... | |
#define | LAL_YRJUL_SI 31557600e0 |
Julian year, s. More... | |
#define | LAL_LYR_SI 9460730472580800e0 |
(Julian) Lightyear, m More... | |
#define | LAL_AU_SI 149597870700e0 |
Astronomical unit, m. More... | |
#define | LAL_PC_SI 3.085677581491367278913937957796471611e16 |
Parsec, m. More... | |
#define | LAL_GMEARTH_SI 3.986004e+14 |
Nominal Earth mass parameter, m^3 s^-2. More... | |
#define | LAL_REEARTH_SI 6.3781e+6 |
Nominal Earth equatorial radius, m. More... | |
#define | LAL_RPEARTH_SI 6.3568e+6 |
Nominal Earth polar radius, m. More... | |
#define | LAL_GMJUP_SI 1.2668653e+17 |
Nominal Jupiter mass parameter, m^3 s^-2. More... | |
#define | LAL_REJUP_SI 7.1492e+7 |
Nominal Jupiter equatorial radius, m. More... | |
#define | LAL_RPJUP_SI 6.6854e+7 |
Nominal Jupiter polar radius, m. More... | |
#define | LAL_GMSUN_SI 1.3271244e+20 |
Nominal solar mass parameter, m^3 s^-2. More... | |
#define | LAL_RSUN_SI 6.957e+8 |
Nominal solar radius, m. More... | |
#define | LAL_SSUN_SI 1361e0 |
Nominal total solar irradiance, W m^-2. More... | |
#define | LAL_LSUN_SI 3.828e+26 |
Nominal solar luminosity, W. More... | |
#define | LAL_TSUN_SI 5772e0 |
Nominal solar effective temperature, K. More... | |
Primary astrophysical parameters | |
These astrophysical constants are given to the precision to which they are known. Other physical constants derived from these are given in the next section. | |
#define | LAL_REARTH_SI 6378136.6 |
Earth equatorial radius, m. More... | |
#define | LAL_AWGS84_SI 6378137e0 |
Semimajor axis of WGS-84 Reference Ellipsoid, m. More... | |
#define | LAL_BWGS84_SI 6356752.314 |
Semiminor axis of WGS-84 Reference Ellipsoid, m. More... | |
#define | LAL_IEARTH 0.409092600600582871467239393761915655 |
Earth inclination (2000), radians. More... | |
#define | LAL_EEARTH 0.0167 |
Earth orbital eccentricity, dimensionless. More... | |
#define | LAL_EPREC_SI 1.127703867758020059420250393792953007e-12 |
Rate of Earth precession (2000), Hz. More... | |
#define | LAL_GMEARTH_TCB_SI 3.986004418e+14 |
Earth mass parameter, m^3 s^-2 (TCB) More... | |
#define | LAL_GMEARTH_TDB_SI 3.986004356e+14 |
Earth mass parameter, m^3 s^-2 (TDB) More... | |
#define | LAL_GMEARTH_TT_SI 3.986004415e+14 |
Earth mass parameter, m^3 s^-2 (TT) More... | |
#define | LAL_GMSUN_TCB_SI 1.32712442099e+20 |
Solar mass parameter, m^3 s^-2 (TCB) More... | |
#define | LAL_GMSUN_TDB_SI 1.32712440041e+20 |
Solar mass parameter, m^3 s^-2 (TDB) More... | |
#define | LAL_YRTROP_SI 31556925.1874707200 |
Tropical year (2000), s. More... | |
#define | LAL_YRSID_SI 31558149.763545600 |
Sidereal year (2000), s. More... | |
Derived astrophysical parameters | |
The following constants are derived from the primary astrophysical constants. When not dimensionless, they are given in the SI units shown. Precision beyond the accuracy is retained for these constants in order that equivalent combinations yield the same value. | |
#define | LAL_COSIEARTH 0.917482143065241841533315838574859003 |
Cosine of Earth inclination (2000) More... | |
#define | LAL_SINIEARTH 0.397776969112605992551264763661918798 |
Sine of Earth inclination (2000) More... | |
#define | LAL_MEARTH_SI 5.972167867791378871192484605127129437e24 |
Nominal Earth mass, kg. More... | |
#define | LAL_MEARTH_TCB_SI 5.972168494074284943739418365970963247e24 |
Earth mass, kg (TCB) More... | |
#define | LAL_MEARTH_TDB_SI 5.972168401180648157859251157424748663e24 |
Earth mass, kg (TDB) More... | |
#define | LAL_MEARTH_TT_SI 5.972168489579431550874248984912275445e24 |
Earth mass, kg (TT) More... | |
#define | LAL_MJUP_SI 1.898124597336050222495242946825884362e27 |
Nominal Jupiter mass, kg. More... | |
#define | LAL_MSUN_SI 1.988409870698050731911960804878414216e30 |
Nominal solar mass, kg. More... | |
#define | LAL_MRSUN_SI 1.476625038050124729627979840144936351e3 |
Geometrized nominal solar mass, m. More... | |
#define | LAL_MTSUN_SI 4.925490947641266978197229498498379006e-6 |
Geometrized nominal solar mass, s. More... | |
#define | LAL_MSUN_TCB_SI 1.988409902147041637325262574352366540e30 |
Solar mass, kg (TCB) More... | |
#define | LAL_MSUN_TDB_SI 1.988409871312347362270200620289768215e30 |
Solar mass, kg (TDB) More... | |
#define | LAL_SOL_SID 1.002737909344968654292933133909634024 |
Ratio of mean solar day to sidereal day, dimensionless. More... | |
#define | LAL_DAYSID_SI 86164.090531333536768710524462700317733190 |
Mean sidereal day, s. More... | |
Cosmological parameters | |
The following cosmological parameters are derived from measurements of the Hubble expansion rate and of the cosmic microwave background radiation. In what follows, the normalized Hubble constant \(h_0\) is equal to the actual Hubble constant \(H_0\) divided by \(\langle H \rangle=100\,\mathrm{km}\,\mathrm{s}^{-1}\mathrm{Mpc}^{-1}\). Thus the Hubble constant can be written as: \(H_0 = \langle H \rangle * h_0\). Similarly, the critical energy density \(\rho_c\) required for spatial flatness is given by: \(\rho_c = \langle\rho\rangle h_0^2\). Current estimates give \(h_0\) a value of around 0.69 which is what is assumed below. All values are in the SI units shown. | |
#define | LAL_H0FAC_SI 3.240779289444365023237687716352957261e-18 |
Hubble constant prefactor, s^-1. More... | |
#define | LAL_H0_SI (0.69 * LAL_H0FAC_SI) |
Approximate Hubble constant, s^-1. More... | |
#define | LAL_RHOCFAC_SI 1.688169255655572064052978218230767915e-9 |
Critical energy density prefactor, J m^-3. More... | |
#define | LAL_RHOC_SI (0.69 * 0.69 * LAL_RHOCFAC_SI) |
Approximate critical energy density, J m^-3. More... | |
#define | LAL_TCMB_SI 2.72548 |
Cosmic microwave background radiation temperature, K. More... | |
#define | LAL_VCMB_SI 369883.9346804 |
Solar velocity with respect to the cosmic microwave background radiation, m s^-1. More... | |
#define | LAL_NCMB_SI 4.107178061233267795913602167900672966e8 |
Number density of cosmic microwave background radiation photons, m^-3. More... | |
#define | LAL_SCMB_SI 2.042296344521760298284258925842980552e-14 |
Entropy density of cosmic microwave background radiation, J K^-1 m^-3. More... | |