23 #include <lal/LALStdlib.h>
24 #include <lal/Units.h>
25 #include <lal/XLALError.h>
94 if ( ! unit1 || ! unit2 )
double REAL8
Double precision real floating-point number (8 bytes).
@ LALNumUnits
The number of units.
int XLALUnitIsDimensionless(const LALUnit *unit)
Return 1 if a unit is dimensionless, 0 otherwise.
REAL8 XLALUnitRatio(const LALUnit *unit1, const LALUnit *unit2)
Return the ratio unit1 / unit2.
int XLALUnitCompare(const LALUnit *unit1, const LALUnit *unit2)
Returns 0 if the the normal form of the two unit structures are the same or > 0 if they are different...
REAL8 XLALUnitPrefactor(const LALUnit *unit)
Return the unit's prefactor.
LALUnit * XLALUnitDivide(LALUnit *output, const LALUnit *unit1, const LALUnit *unit2)
UNDOCUMENTED.
int XLALUnitNormalize(LALUnit *unit)
Returns 0 upon success or XLAL_FAILURE if the input pointer is NULL, in which case xlalErrno is set t...
#define XLAL_ERROR_REAL8(...)
Macro to invoke a failure from a XLAL routine returning a REAL8.
#define XLAL_ERROR(...)
Macro to invoke a failure from a XLAL routine returning an integer.
@ XLAL_EFAULT
Invalid pointer.
@ XLAL_EFUNC
Internal function call failed bit: "or" this with existing error number.
@ XLAL_EDIMS
Wrong dimensions.
This structure stores units in the mksA system (plus Kelvin, Strain, and ADC Count).
INT2 powerOfTen
Overall power-of-ten scaling is 10^powerOfTen.
UINT2 unitDenominatorMinusOne[LALNumUnits]
Array of unit power denominators-minus-one.
INT2 unitNumerator[LALNumUnits]
Array of unit power numerators.