LAL  7.5.0.1-8083555

Detailed Description

Multiplies two LALUnit structures.

Author
J. T. Whelan john..nosp@m.whel.nosp@m.an@li.nosp@m.go.o.nosp@m.rg

This function multiplies together the LALUnit structures *(input->unitOne) and *(input->unitTwo), thus allowing a module to e.g., multiply two REAL8TimeSeries and give the resulting REAL8TimeSeries the correct units.

Algorithm

The function first adds together the overall powers of ten in the two input unit structures, then adds each of the corresponding rational powers in *(input->unitOne) and *(input->unitTwo) by naïve addition of rational numbers

\[ \frac{N_1}{1+D_1} + \frac{N_2}{1+D_2} = \frac{N_1 (1+D_2) + N_2(1+D_1)}{1 + (1+D_1)(1+D_2)-1} \]

and then calls XLALUnitNormalize() to bring the result into standard form.

Prototypes

LALUnitXLALUnitMultiply (LALUnit *output, const LALUnit *unit1, const LALUnit *unit2)
 This function multiplies together the LALUnit structures *(input->unitOne) and *(input->unitTwo), thus allowing a module to eg, multiply two REAL8TimeSeries and give the resulting REAL8TimeSeries the correct units. More...
 
LALUnitXLALUnitDivide (LALUnit *output, const LALUnit *unit1, const LALUnit *unit2)
 UNDOCUMENTED. More...
 

Function Documentation

◆ XLALUnitMultiply()

LALUnit* XLALUnitMultiply ( LALUnit output,
const LALUnit unit1,
const LALUnit unit2 
)

This function multiplies together the LALUnit structures *(input->unitOne) and *(input->unitTwo), thus allowing a module to eg, multiply two REAL8TimeSeries and give the resulting REAL8TimeSeries the correct units.

Uses

XLALUnitNormalize()

Definition at line 64 of file UnitMultiply.c.

◆ XLALUnitDivide()

LALUnit* XLALUnitDivide ( LALUnit output,
const LALUnit unit1,
const LALUnit unit2 
)

UNDOCUMENTED.

Definition at line 108 of file UnitMultiply.c.