23 #include <lal/LALStdlib.h>
24 #include <lal/Units.h>
56 UINT2 next_numer,next_denom,remainder;
57 next_numer=abs(numer);
59 while(next_denom != 0){
60 remainder=next_numer%next_denom;
61 next_numer=next_denom;
int16_t INT2
Two-byte signed integer.
uint16_t UINT2
Two-byte unsigned integer.
@ LALNumUnits
The number of units.
static UINT2 gcd(INT2 numer, UINT2 denom)
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(...)
Macro to invoke a failure from a XLAL routine returning an integer.
@ XLAL_EFAULT
Invalid pointer.
This structure stores units in the mksA system (plus Kelvin, Strain, and ADC Count).
UINT2 unitDenominatorMinusOne[LALNumUnits]
Array of unit power denominators-minus-one.
INT2 unitNumerator[LALNumUnits]
Array of unit power numerators.