LAL  7.1.7.1-15d842a

Detailed Description

Raises an LALUnit structure to a specified rational power.

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

This function raises the LALUnit structure *input to the rational power *power. In this way, units such as \(\mathrm{s}^{1/2}\) and \(\mathrm{m}^{-1}\) can be created using existing units.

Algorithm

The function first multiplies the overall power of ten input->powerOfTen by the rational number *power, checking to make sure that the resulting power is still an integer. It then multiplies each of the rational powers in *input by *power by naïve multiplication of rational numbers

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

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

Prototypes

LALUnitXLALUnitRaiseRAT4 (LALUnit *output, const LALUnit *input, const RAT4 *power)
 Raises a LALUnit structure to a rational power given by the RAT4 structure power. More...
 
LALUnitXLALUnitRaiseINT2 (LALUnit *output, const LALUnit *input, INT2 power)
 Raises a LALUnit structure to an integer power power. More...
 
LALUnitXLALUnitSquare (LALUnit *output, const LALUnit *input)
 Produces the square of a LALUnit structure. More...
 
LALUnitXLALUnitSqrt (LALUnit *output, const LALUnit *input)
 Produces the square-root of a LALUnit structure. More...
 
LALUnitXLALUnitInvert (LALUnit *output, const LALUnit *input)
 UNDOCUMENTED. More...
 

Function Documentation

◆ XLALUnitRaiseRAT4()

LALUnit* XLALUnitRaiseRAT4 ( LALUnit output,
const LALUnit input,
const RAT4 power 
)

Raises a LALUnit structure to a rational power given by the RAT4 structure power.

Definition at line 56 of file UnitRaise.c.

◆ XLALUnitRaiseINT2()

LALUnit* XLALUnitRaiseINT2 ( LALUnit output,
const LALUnit input,
INT2  power 
)

Raises a LALUnit structure to an integer power power.

Definition at line 106 of file UnitRaise.c.

◆ XLALUnitSquare()

LALUnit* XLALUnitSquare ( LALUnit output,
const LALUnit input 
)

Produces the square of a LALUnit structure.

Definition at line 120 of file UnitRaise.c.

◆ XLALUnitSqrt()

LALUnit* XLALUnitSqrt ( LALUnit output,
const LALUnit input 
)

Produces the square-root of a LALUnit structure.

Definition at line 133 of file UnitRaise.c.

◆ XLALUnitInvert()

LALUnit* XLALUnitInvert ( LALUnit output,
const LALUnit input 
)

UNDOCUMENTED.

Definition at line 144 of file UnitRaise.c.