23 #include <lal/LALStdlib.h>
24 #include <lal/Units.h>
62 UINT4 denom, denom1, denom2;
64 if ( !
output || ! input || ! power )
74 if ( numer >= 32767L || numer <= -32768L )
81 denom = denom1 * denom2;
83 if ( denom - 1 >= 65535L )
90 if ( numer >= 32767L || numer <= -32768L )
int16_t INT2
Two-byte signed integer.
uint16_t UINT2
Two-byte unsigned integer.
uint32_t UINT4
Four-byte unsigned integer.
int32_t INT4
Four-byte signed integer.
@ LALNumUnits
The number of units.
int XLALUnitNormalize(LALUnit *unit)
Returns 0 upon success or XLAL_FAILURE if the input pointer is NULL, in which case xlalErrno is set t...
LALUnit * XLALUnitRaiseINT2(LALUnit *output, const LALUnit *input, INT2 power)
Raises a LALUnit structure to an integer power power.
LALUnit * XLALUnitInvert(LALUnit *output, const LALUnit *input)
UNDOCUMENTED.
LALUnit * XLALUnitRaiseRAT4(LALUnit *output, const LALUnit *input, const RAT4 *power)
Raises a LALUnit structure to a rational power given by the RAT4 structure power.
LALUnit * XLALUnitSquare(LALUnit *output, const LALUnit *input)
Produces the square of a LALUnit structure.
LALUnit * XLALUnitSqrt(LALUnit *output, const LALUnit *input)
Produces the square-root of a LALUnit structure.
#define XLAL_ERROR_NULL(...)
Macro to invoke a failure from a XLAL routine returning a pointer.
@ XLAL_EFAULT
Invalid pointer.
@ XLAL_ERANGE
Output range error.
@ XLAL_EFUNC
Internal function call failed bit: "or" this with existing error number.
@ XLAL_EINVAL
Invalid argument.
@ XLAL_FAILURE
Failure return value (not an error number)
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.
A four-byte rational number, used as a parameter structure for XLALUnitRaiseRAT4().
INT2 numerator
The numerator.
UINT2 denominatorMinusOne
One less than the denominator.
void output(int gps_sec, int output_type)